summaryrefslogtreecommitdiffstats
path: root/samples/StackWidget/res
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2011-02-10 18:19:50 -0800
committerAdam Cohen <adamcohen@google.com>2011-02-11 15:11:43 -0800
commit1ff28c7b12986856d8a975d4713d35093b831016 (patch)
tree0ea2b8245f51bbf26a42a852eaab16db3d5d19f8 /samples/StackWidget/res
parentf8da117394bf87387fb71f3d8465edb558949c21 (diff)
downloadandroid_development-1ff28c7b12986856d8a975d4713d35093b831016.tar.gz
android_development-1ff28c7b12986856d8a975d4713d35093b831016.tar.bz2
android_development-1ff28c7b12986856d8a975d4713d35093b831016.zip
Making StackWidget sample code stand alone as opposed to bundled with HoneycombGallery
Change-Id: I9da8433ee8a9710f5a5362a6f82fc96d4f456c88
Diffstat (limited to 'samples/StackWidget/res')
-rw-r--r--samples/StackWidget/res/drawable-hdpi/icon.pngbin0 -> 4147 bytes
-rw-r--r--samples/StackWidget/res/drawable-ldpi/icon.pngbin0 -> 1723 bytes
-rw-r--r--samples/StackWidget/res/drawable-mdpi/icon.pngbin0 -> 2574 bytes
-rw-r--r--samples/StackWidget/res/drawable-nodpi/preview.pngbin0 -> 2525 bytes
-rw-r--r--samples/StackWidget/res/drawable-nodpi/widget_item_background.xml18
-rw-r--r--samples/StackWidget/res/layout/widget_item.xml24
-rw-r--r--samples/StackWidget/res/layout/widget_layout.xml35
-rw-r--r--samples/StackWidget/res/values/strings.xml18
-rw-r--r--samples/StackWidget/res/xml/stackwidgetinfo.xml24
9 files changed, 119 insertions, 0 deletions
diff --git a/samples/StackWidget/res/drawable-hdpi/icon.png b/samples/StackWidget/res/drawable-hdpi/icon.png
new file mode 100644
index 000000000..8074c4c57
--- /dev/null
+++ b/samples/StackWidget/res/drawable-hdpi/icon.png
Binary files differ
diff --git a/samples/StackWidget/res/drawable-ldpi/icon.png b/samples/StackWidget/res/drawable-ldpi/icon.png
new file mode 100644
index 000000000..1095584ec
--- /dev/null
+++ b/samples/StackWidget/res/drawable-ldpi/icon.png
Binary files differ
diff --git a/samples/StackWidget/res/drawable-mdpi/icon.png b/samples/StackWidget/res/drawable-mdpi/icon.png
new file mode 100644
index 000000000..a07c69fa5
--- /dev/null
+++ b/samples/StackWidget/res/drawable-mdpi/icon.png
Binary files differ
diff --git a/samples/StackWidget/res/drawable-nodpi/preview.png b/samples/StackWidget/res/drawable-nodpi/preview.png
new file mode 100644
index 000000000..f2f83a0ad
--- /dev/null
+++ b/samples/StackWidget/res/drawable-nodpi/preview.png
Binary files differ
diff --git a/samples/StackWidget/res/drawable-nodpi/widget_item_background.xml b/samples/StackWidget/res/drawable-nodpi/widget_item_background.xml
new file mode 100644
index 000000000..c0b3843e8
--- /dev/null
+++ b/samples/StackWidget/res/drawable-nodpi/widget_item_background.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ 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.
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+ <gradient android:startColor="#ff666666" android:endColor="#ff333333" android:angle="270" />
+</shape>
diff --git a/samples/StackWidget/res/layout/widget_item.xml b/samples/StackWidget/res/layout/widget_item.xml
new file mode 100644
index 000000000..75e31ab51
--- /dev/null
+++ b/samples/StackWidget/res/layout/widget_item.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ 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.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/widget_item"
+ android:layout_width="120dp"
+ android:layout_height="120dp"
+ android:gravity="center"
+ android:background="@drawable/widget_item_background"
+ android:textColor="#ffffff"
+ android:textStyle="bold"
+ android:textSize="44sp" />
diff --git a/samples/StackWidget/res/layout/widget_layout.xml b/samples/StackWidget/res/layout/widget_layout.xml
new file mode 100644
index 000000000..11f9d3665
--- /dev/null
+++ b/samples/StackWidget/res/layout/widget_layout.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ 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.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+ <StackView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/stack_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:loopViews="true" />
+ <TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/empty_view"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:gravity="center"
+ android:background="@drawable/widget_item_background"
+ android:textColor="#ffffff"
+ android:textStyle="bold"
+ android:text="@string/empty_view_text"
+ android:textSize="20sp" />
+</FrameLayout>
diff --git a/samples/StackWidget/res/values/strings.xml b/samples/StackWidget/res/values/strings.xml
new file mode 100644
index 000000000..acb2f7fee
--- /dev/null
+++ b/samples/StackWidget/res/values/strings.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ 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.
+-->
+<resources>
+ <string name="empty_view_text">This is the empty view</string>
+</resources>
diff --git a/samples/StackWidget/res/xml/stackwidgetinfo.xml b/samples/StackWidget/res/xml/stackwidgetinfo.xml
new file mode 100644
index 000000000..8c2630f53
--- /dev/null
+++ b/samples/StackWidget/res/xml/stackwidgetinfo.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 The Android Open Source Project
+
+ 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.
+-->
+<appwidget-provider
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minWidth="150dip"
+ android:minHeight="150dip"
+ android:updatePeriodMillis="3600000"
+ android:previewImage="@drawable/preview"
+ android:initialLayout="@layout/widget_layout"
+ android:autoAdvanceViewId="@id/stack_view">
+</appwidget-provider> \ No newline at end of file