diff options
author | Andrew Dolgov <[email protected]> | 2013-05-21 16:26:47 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-21 16:26:47 +0400 |
commit | 287392e0dbc7c6b016446721f10d0a9d47496e3e (patch) | |
tree | a3c643ead695b4a013b2a3a2b075e6fe0fce7d5e /res | |
parent | 4f49ae38dd06974ada031153569b5fff64e8afb3 (diff) |
add 1x1 simple widget
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/loading_fragment.xml | 2 | ||||
-rw-r--r-- | res/layout/widget_small.xml | 42 | ||||
-rw-r--r-- | res/xml/widget_small.xml | 8 |
3 files changed, 51 insertions, 1 deletions
diff --git a/res/layout/loading_fragment.xml b/res/layout/loading_fragment.xml index 352662e6..bc1fd10d 100644 --- a/res/layout/loading_fragment.xml +++ b/res/layout/loading_fragment.xml @@ -5,7 +5,7 @@ <ProgressBar
- android:id="@+id/progressBar1"
+ android:id="@+id/progress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/res/layout/widget_small.xml b/res/layout/widget_small.xml new file mode 100644 index 00000000..e0948a11 --- /dev/null +++ b/res/layout/widget_small.xml @@ -0,0 +1,42 @@ +<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" >
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ 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="4dp"
+ android:src="@drawable/icon" />
+
+ <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:textAppearance="?android:attr/textAppearanceSmall"
+ android:textColor="@android:color/primary_text_dark" />
+
+ </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 diff --git a/res/xml/widget_small.xml b/res/xml/widget_small.xml new file mode 100644 index 00000000..2ad3a638 --- /dev/null +++ b/res/xml/widget_small.xml @@ -0,0 +1,8 @@ +<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minWidth="40dp"
+ android:minHeight="40dp"
+ android:updatePeriodMillis="86400000"
+ android:initialLayout="@layout/widget_small"
+ android:resizeMode="horizontal|vertical"
+ android:widgetCategory="home_screen">
+</appwidget-provider>
\ No newline at end of file |