diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java
index e45bd301..40f7d100 100644
--- a/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java
+++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/widget/WidgetUpdateService.java
@@ -1,14 +1,5 @@
package org.fox.ttrss.widget;
-import java.util.HashMap;
-
-import org.fox.ttrss.ApiRequest;
-import org.fox.ttrss.R;
-import org.fox.ttrss.util.SimpleLoginManager;
-
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-
import android.app.Service;
import android.appwidget.AppWidgetManager;
import android.content.ComponentName;
@@ -17,9 +8,17 @@ import android.content.SharedPreferences;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.util.Log;
-import android.view.View;
import android.widget.RemoteViews;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+import org.fox.ttrss.ApiRequest;
+import org.fox.ttrss.R;
+import org.fox.ttrss.util.SimpleLoginManager;
+
+import java.util.HashMap;
+
public class WidgetUpdateService extends Service {
private final String TAG = this.getClass().getSimpleName();
@@ -51,8 +50,7 @@ public class WidgetUpdateService extends Service {
final AppWidgetManager manager = AppWidgetManager.getInstance(this);
try {
- view.setTextViewText(R.id.counter, String.valueOf(""));
- view.setViewVisibility(R.id.progress, View.VISIBLE);
+ view.setTextViewText(R.id.counter, String.valueOf("..."));
manager.updateAppWidget(thisWidget, view);
@@ -80,7 +78,6 @@ public class WidgetUpdateService extends Service {
if (content != null) {
int unread = content.get("unread").getAsInt();
- view.setViewVisibility(R.id.progress, View.GONE);
view.setTextViewText(R.id.counter, String.valueOf(unread));
manager.updateAppWidget(thisWidget, view);
@@ -91,7 +88,6 @@ public class WidgetUpdateService extends Service {
}
}
- view.setViewVisibility(R.id.progress, View.GONE);
view.setTextViewText(R.id.counter, "?");
manager.updateAppWidget(thisWidget, view);
}
@@ -112,7 +108,6 @@ public class WidgetUpdateService extends Service {
@Override
protected void onLoginFailed(int requestId, ApiRequest ar) {
- view.setViewVisibility(R.id.progress, View.GONE);
view.setTextViewText(R.id.counter, "?");
manager.updateAppWidget(thisWidget, view);
}
@@ -132,7 +127,6 @@ public class WidgetUpdateService extends Service {
} catch (Exception e) {
e.printStackTrace();
- view.setViewVisibility(R.id.progress, View.GONE);
view.setTextViewText(R.id.counter, getString(R.string.app_name));
manager.updateAppWidget(thisWidget, view);
diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_bg_pressed.9.png b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_bg_pressed.9.png
new file mode 100644
index 00000000..efacbcfa
Binary files /dev/null and b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_bg_pressed.9.png differ
diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg.9.png b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg.9.png
new file mode 100644
index 00000000..02ee4401
Binary files /dev/null and b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg.9.png differ
diff --git a/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg_focused.9.png b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg_focused.9.png
new file mode 100644
index 00000000..ccc01774
Binary files /dev/null and b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg_focused.9.png differ
diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_bg_pressed.9.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_bg_pressed.9.png
new file mode 100644
index 00000000..97a3ba09
Binary files /dev/null and b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_bg_pressed.9.png differ
diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg.9.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg.9.png
new file mode 100644
index 00000000..7ccb762b
Binary files /dev/null and b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg.9.png differ
diff --git a/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg_focused.9.png b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg_focused.9.png
new file mode 100644
index 00000000..da9289e6
Binary files /dev/null and b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg_focused.9.png differ
diff --git a/org.fox.ttrss/src/main/res/drawable/appwidget_dark_bg_clickable.xml b/org.fox.ttrss/src/main/res/drawable/appwidget_dark_bg_clickable.xml
new file mode 100644
index 00000000..7cfc9d2b
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable/appwidget_dark_bg_clickable.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
diff --git a/org.fox.ttrss/src/main/res/layout/widget_small.xml b/org.fox.ttrss/src/main/res/layout/widget_small.xml
index ec377296..2ea0e9bd 100644
--- a/org.fox.ttrss/src/main/res/layout/widget_small.xml
+++ b/org.fox.ttrss/src/main/res/layout/widget_small.xml
@@ -1,42 +1,34 @@
+ android:padding="@dimen/widget_margin"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
+ android:textColor="@android:color/primary_text_dark"
+ android:textSize="13sp" />
-
-
-
\ No newline at end of file
+
diff --git a/org.fox.ttrss/src/main/res/values/dimens.xml b/org.fox.ttrss/src/main/res/values/dimens.xml
index 47c82246..71882af8 100644
--- a/org.fox.ttrss/src/main/res/values/dimens.xml
+++ b/org.fox.ttrss/src/main/res/values/dimens.xml
@@ -2,4 +2,5 @@
16dp
16dp
+ 0dp
diff --git a/org.fox.ttrss/src/main/res/xml/widget_small.xml b/org.fox.ttrss/src/main/res/xml/widget_small.xml
index c41eb3d2..df80ac46 100644
--- a/org.fox.ttrss/src/main/res/xml/widget_small.xml
+++ b/org.fox.ttrss/src/main/res/xml/widget_small.xml
@@ -3,6 +3,6 @@
android:minHeight="40dp"
android:updatePeriodMillis="86400000"
android:initialLayout="@layout/widget_small"
- android:resizeMode="horizontal|vertical"
+ android:resizeMode="none"
android:widgetCategory="home_screen">
\ No newline at end of file