summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2010-11-19 15:06:46 -0800
committerAdam Lesinski <adamlesinski@google.com>2010-11-24 13:37:03 -0800
commitcd5d807f53d9bca006dfc9f46d83497c27e89227 (patch)
tree5f4b0b287460a7104e97b0308caf107e1770b089 /res
parent59fbda815e7b1c38f7aaf5d7eb87601f78e88c5b (diff)
downloadandroid_packages_apps_Trebuchet-cd5d807f53d9bca006dfc9f46d83497c27e89227.tar.gz
android_packages_apps_Trebuchet-cd5d807f53d9bca006dfc9f46d83497c27e89227.tar.bz2
android_packages_apps_Trebuchet-cd5d807f53d9bca006dfc9f46d83497c27e89227.zip
Updating the Static Wallpaper picker for Tablet
- Updated WallpaperChooser to use FragmentDialogs - Backwards compatible with old WallpaperChooser UI on non XLarge screens - There is a known bug with AlertDialogs (b/3225529) that prevents an AlertDialog to expand to fit its content. The squishing of the GridView is caused by that bug. Change-Id: I49381aab4aa24362e8c92da284797fce0e63823c
Diffstat (limited to 'res')
-rw-r--r--res/layout-xlarge/wallpaper_chooser.xml27
-rw-r--r--res/layout-xlarge/wallpaper_item.xml23
-rw-r--r--res/layout/wallpaper_chooser_base.xml25
-rw-r--r--res/values-xlarge/dimens.xml3
-rw-r--r--res/values-xlarge/strings.xml24
-rw-r--r--res/values-xlarge/styles.xml3
-rw-r--r--res/values/dimens.xml4
-rw-r--r--res/values/styles.xml4
8 files changed, 113 insertions, 0 deletions
diff --git a/res/layout-xlarge/wallpaper_chooser.xml b/res/layout-xlarge/wallpaper_chooser.xml
new file mode 100644
index 000000000..9649e88f9
--- /dev/null
+++ b/res/layout-xlarge/wallpaper_chooser.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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.
+*/
+-->
+
+<GridView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/gallery"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:numColumns="4"
+ android:columnWidth="@dimen/wallpaper_small_width"
+ android:stretchMode="columnWidth" /> \ No newline at end of file
diff --git a/res/layout-xlarge/wallpaper_item.xml b/res/layout-xlarge/wallpaper_item.xml
new file mode 100644
index 000000000..4246b9ab5
--- /dev/null
+++ b/res/layout-xlarge/wallpaper_item.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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.
+-->
+
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="@dimen/wallpaper_small_width"
+ android:layout_height="wrap_content"
+ android:padding="5dp"
+ android:scaleType="fitXY"
+ android:adjustViewBounds="false"
+ android:focusable="false" />
diff --git a/res/layout/wallpaper_chooser_base.xml b/res/layout/wallpaper_chooser_base.xml
new file mode 100644
index 000000000..8447027c1
--- /dev/null
+++ b/res/layout/wallpaper_chooser_base.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2010, 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:id="@+id/wallpaper_chooser_base"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+</FrameLayout>
diff --git a/res/values-xlarge/dimens.xml b/res/values-xlarge/dimens.xml
index d98674f6c..7033553a2 100644
--- a/res/values-xlarge/dimens.xml
+++ b/res/values-xlarge/dimens.xml
@@ -50,4 +50,7 @@
<dimen name="delete_zone_size">50dip</dimen>
<dimen name="delete_zone_min_padding">10dip</dimen>
<dimen name="delete_zone_max_padding">20dip</dimen>
+
+ <!-- dimensions for the wallpaper picker wallpaper thumbnail width -->
+ <dimen name="wallpaper_small_width">170dp</dimen>
</resources>
diff --git a/res/values-xlarge/strings.xml b/res/values-xlarge/strings.xml
new file mode 100644
index 000000000..738baf5cf
--- /dev/null
+++ b/res/values-xlarge/strings.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+* Copyright (C) 2010 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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Option in "Select wallpaper from" dialog box -->
+ <string name="pick_wallpaper">Select wallpaper</string>
+ <string name="wallpaper_cancel">Cancel</string>
+</resources> \ No newline at end of file
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
index fcbd9695d..5198d3048 100644
--- a/res/values-xlarge/styles.xml
+++ b/res/values-xlarge/styles.xml
@@ -18,6 +18,9 @@
-->
<resources>
+ <style name="Theme.WallpaperPicker" parent="android:Theme.Holo.Dialog.NoFrame">
+ </style>
+
<style name="Theme" parent="android:Theme.Holo">
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionModeOverlay">true</item>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index d6cd3eeb0..39739c28b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -44,4 +44,8 @@
<!-- the area at the edge of the screen that makes the workspace go left
or right while you're dragging. -->
<dimen name="scroll_zone">20dp</dimen>
+
+ <!-- How much the content view of an alert dialog should be inset (currently used
+ for the WallpaperChooser in XLarge mode) -->
+ <dimen name="alert_dialog_content_inset">15dp</dimen>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index a97b3c50b..c867d3854 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,6 +18,10 @@
-->
<resources>
+ <style name="Theme.WallpaperPicker" parent="android:Theme">
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
<style name="Theme.Base" parent="android:Theme.Wallpaper">
</style>