summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-08-31 17:01:06 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-31 17:01:06 +0000
commit03412672d141629593561031e331739c28bc7476 (patch)
tree6b163d6744129faae3ff6b1a58ca4adfeb2bc969 /res
parent3afcff56c44c593fc0b2e04bcfbfaac759ec56ff (diff)
parent6670d16341f2311925765511c54afab196a0d2bd (diff)
downloadandroid_packages_wallpapers_LivePicker-03412672d141629593561031e331739c28bc7476.tar.gz
android_packages_wallpapers_LivePicker-03412672d141629593561031e331739c28bc7476.tar.bz2
android_packages_wallpapers_LivePicker-03412672d141629593561031e331739c28bc7476.zip
Merge "Moving the set wallpaper button to the top to match the default launcher style"
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_settings.xml26
-rw-r--r--res/drawable/ic_tick.xml26
-rw-r--r--res/layout/live_wallpaper_preview.xml43
-rw-r--r--res/menu/menu_preview.xml25
-rw-r--r--res/values/styles.xml31
5 files changed, 112 insertions, 39 deletions
diff --git a/res/drawable/ic_settings.xml b/res/drawable/ic_settings.xml
new file mode 100644
index 0000000..a9a5708
--- /dev/null
+++ b/res/drawable/ic_settings.xml
@@ -0,0 +1,26 @@
+<!--
+Copyright (C) 2015 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24.0dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:width="24.0dp" >
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" />
+
+</vector>
diff --git a/res/drawable/ic_tick.xml b/res/drawable/ic_tick.xml
new file mode 100644
index 0000000..4389a16
--- /dev/null
+++ b/res/drawable/ic_tick.xml
@@ -0,0 +1,26 @@
+<!--
+Copyright (C) 2015 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.
+-->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24.0dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:width="24.0dp" >
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" />
+
+</vector>
diff --git a/res/layout/live_wallpaper_preview.xml b/res/layout/live_wallpaper_preview.xml
index 1fa7ec8..6dcb644 100644
--- a/res/layout/live_wallpaper_preview.xml
+++ b/res/layout/live_wallpaper_preview.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 The Android Open Source Project
+<!--
+ Copyright (C) 2009 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.
@@ -13,36 +14,12 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<Button xmlns:android="http://schemas.android.com/apk/res/android"
+ style="@style/ActionBarSetWallpaperStyle"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
-
- android:layout_gravity="center_horizontal|bottom"
- android:background="#88000000"
- style="?android:attr/buttonBarStyle">
-
- <Button
- android:id="@+id/configure"
-
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="center_vertical"
-
- android:text="@string/configure_wallpaper"
-
- android:onClick="configureLiveWallpaper"
- style="?android:attr/buttonBarButtonStyle" />
-
- <Button
- android:layout_width="0dip"
- android:layout_height="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="center_vertical"
-
- android:text="@string/wallpaper_instructions"
-
- android:onClick="setLiveWallpaper"
- style="?android:attr/buttonBarButtonStyle" />
-</LinearLayout>
+ android:layout_height="match_parent"
+ android:drawablePadding="8dp"
+ android:drawableStart="@drawable/ic_tick"
+ android:gravity="start|center_vertical"
+ android:onClick="setLiveWallpaper"
+ android:text="@string/wallpaper_instructions" />
diff --git a/res/menu/menu_preview.xml b/res/menu/menu_preview.xml
new file mode 100644
index 0000000..26adc2d
--- /dev/null
+++ b/res/menu/menu_preview.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/configure"
+ android:icon="@drawable/ic_settings"
+ android:showAsAction="ifRoom"
+ android:title="@string/configure_wallpaper"/>
+
+</menu>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8684f16..b908235 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -18,6 +18,7 @@
-->
<resources>
+
<style name="WallpaperTitle">
<item name="android:textSize">20dip</item>
<item name="android:shadowColor">#FF000000</item>
@@ -27,15 +28,33 @@
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:gravity">left</item>
</style>
-
- <style name="Preview" parent="android:Theme.Holo">
+
+ <style name="LivePickerTheme" parent="android:style/Theme.Holo">
<item name="android:windowNoTitle">true</item>
+ </style>
+
+ <style name="Preview" parent="@android:style/Theme.DeviceDefault">
+ <item name="android:actionBarStyle">@style/PreviewActionBar</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation.Activity</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowActionBarOverlay">true</item>
+ <item name="android:windowTranslucentNavigation">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
- <item name="android:windowAnimationStyle">@android:style/Animation.Activity</item>
</style>
- <style name="LivePickerTheme" parent="android:style/Theme.Holo">
- <item name="android:windowNoTitle">true</item>
+ <style name="PreviewActionBar" parent="@android:style/Widget.DeviceDefault.ActionBar">
+ <item name="android:displayOptions">showCustom</item>
+ <item name="android:background">#88000000</item>
+ <item name="android:contentInsetEnd">0dp</item>
+ <item name="android:contentInsetLeft">0dp</item>
+ <item name="android:contentInsetRight">0dp</item>
+ <item name="android:contentInsetStart">0dp</item>
</style>
-</resources>
+
+ <style name="ActionBarSetWallpaperStyle" parent="@android:style/Widget.DeviceDefault.ActionButton">
+ <item name="android:textColor">#ffffffff</item>
+ <item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
+ </style>
+
+</resources> \ No newline at end of file