summaryrefslogtreecommitdiff
path: root/org.fox.ttrss/src/main/res
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-02-12 22:19:17 +0300
committerAndrew Dolgov <[email protected]>2015-02-12 22:19:17 +0300
commitbd75699773c8a30f662c7eb0f065fe4a5770a88e (patch)
treef2d1f80c4f834b8e3e729357bbedd92fd33448d5 /org.fox.ttrss/src/main/res
parent7d3dc5900bc37dd0f370a8946cf290564b8153e1 (diff)
bring widget up to holo ui standards (lol)
Diffstat (limited to 'org.fox.ttrss/src/main/res')
-rw-r--r--org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_bg_pressed.9.pngbin0 -> 798 bytes
-rw-r--r--org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg.9.pngbin0 -> 731 bytes
-rw-r--r--org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg_focused.9.pngbin0 -> 856 bytes
-rw-r--r--org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_bg_pressed.9.pngbin0 -> 1098 bytes
-rw-r--r--org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg.9.pngbin0 -> 1005 bytes
-rw-r--r--org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg_focused.9.pngbin0 -> 1135 bytes
-rw-r--r--org.fox.ttrss/src/main/res/drawable/appwidget_dark_bg_clickable.xml24
-rw-r--r--org.fox.ttrss/src/main/res/layout/widget_small.xml32
-rw-r--r--org.fox.ttrss/src/main/res/values/dimens.xml1
-rw-r--r--org.fox.ttrss/src/main/res/xml/widget_small.xml2
10 files changed, 38 insertions, 21 deletions
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
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_bg_pressed.9.png
Binary files 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
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg.9.png
Binary files 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
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable-hdpi/appwidget_dark_bg_focused.9.png
Binary files 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
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_bg_pressed.9.png
Binary files 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
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg.9.png
Binary files 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
--- /dev/null
+++ b/org.fox.ttrss/src/main/res/drawable-xhdpi/appwidget_dark_bg_focused.9.png
Binary files 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 @@
+<!--
+ Copyright 2011 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:drawable="@drawable/appwidget_bg_pressed" android:state_pressed="true" />
+ <item android:drawable="@drawable/appwidget_dark_bg_focused"
+ android:state_focused="true"
+ android:state_enabled="true"
+ android:state_window_focused="true" />
+ <item android:drawable="@drawable/appwidget_dark_bg" />
+</selector>
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 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/widget_main"
- android:layout_width="match_parent"
- android:layout_height="fill_parent" >
+ android:padding="@dimen/widget_margin"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" >
<LinearLayout
+ android:background="@drawable/appwidget_dark_bg_clickable"
android:layout_width="match_parent"
android:layout_height="match_parent"
+ android:minWidth="110dp"
+ android:padding="8dp"
android:orientation="vertical" >
<ImageView
- android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:paddingTop="2dp"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/counter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:gravity="center"
- android:text="-1"
- android:shadowColor="#cc000000"
- android:shadowDx="0"
- android:shadowDy="3"
- android:shadowRadius="3"
+ android:layout_gravity="center"
+ android:gravity="center_horizontal"
+ android:text="123"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:textColor="@android:color/primary_text_dark" />
+ android:textColor="@android:color/primary_text_dark"
+ android:textSize="13sp" />
</LinearLayout>
- <ProgressBar
- android:id="@+id/progress"
- style="?android:attr/progressBarStyleLarge"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone" />
-
-</FrameLayout> \ No newline at end of file
+</FrameLayout>
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 @@
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
+ <dimen name="widget_margin">0dp</dimen> <!-- we're v14+ anyway -->
</resources>
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">
</appwidget-provider> \ No newline at end of file