summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/drawable/ic_keyboard_arrow_down_white_24dp.xml24
-rw-r--r--res/drawable/ic_keyboard_arrow_up_white_24dp.xml24
-rw-r--r--res/layout/live_wallpaper_loading.xml24
-rw-r--r--res/layout/live_wallpaper_preview.xml157
-rw-r--r--res/menu/menu_preview.xml5
-rw-r--r--res/values-sw720dp/dimes.xml27
-rw-r--r--res/values-sw720dp/styles.xml21
-rw-r--r--res/values/colors.xml2
-rw-r--r--res/values/dimensions.xml15
-rw-r--r--res/values/strings.xml8
-rw-r--r--res/values/styles.xml32
11 files changed, 274 insertions, 65 deletions
diff --git a/res/drawable/ic_keyboard_arrow_down_white_24dp.xml b/res/drawable/ic_keyboard_arrow_down_white_24dp.xml
new file mode 100644
index 0000000..e4c2a23
--- /dev/null
+++ b/res/drawable/ic_keyboard_arrow_down_white_24dp.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ Copyright (C) 2016 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:width="24.0dp"
+ android:height="24.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M7.41,7.84L12.0,12.42l4.59,-4.58L18.0,9.25l-6.0,6.0 -6.0,-6.0z"/>
+</vector>
diff --git a/res/drawable/ic_keyboard_arrow_up_white_24dp.xml b/res/drawable/ic_keyboard_arrow_up_white_24dp.xml
new file mode 100644
index 0000000..d7b3e13
--- /dev/null
+++ b/res/drawable/ic_keyboard_arrow_up_white_24dp.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ Copyright (C) 2016 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:width="24.0dp"
+ android:height="24.0dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:fillColor="#FFFFFF"
+ android:pathData="M7.41,15.41L12.0,10.83l4.59,4.58L18.0,14.0l-6.0,-6.0 -6.0,6.0z"/>
+</vector>
diff --git a/res/layout/live_wallpaper_loading.xml b/res/layout/live_wallpaper_loading.xml
deleted file mode 100644
index dff8b86..0000000
--- a/res/layout/live_wallpaper_loading.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- 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.
- 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:layout_width="match_parent"
- android:layout_height="match_parent"
-
- android:gravity="center"
-
- android:text="@string/live_wallpaper_loading"
- android:textAppearance="?android:attr/textAppearanceMedium" />
diff --git a/res/layout/live_wallpaper_preview.xml b/res/layout/live_wallpaper_preview.xml
index 6dcb644..fb8ab5c 100644
--- a/res/layout/live_wallpaper_preview.xml
+++ b/res/layout/live_wallpaper_preview.xml
@@ -1,25 +1,136 @@
-<?xml version="1.0" encoding="utf-8"?>
<!--
- 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.
- 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.
--->
-<Button xmlns:android="http://schemas.android.com/apk/res/android"
- style="@style/ActionBarSetWallpaperStyle"
+ ~ Copyright (C) 2016 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"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- 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" />
+ android:layout_height="match_parent">
+
+ <FrameLayout
+ android:id="@+id/loading"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#ff000000"
+ android:forceHasOverlappingRendering="false">
+
+ <ProgressBar
+ style="@android:style/Widget.Material.ProgressBar"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center"
+ android:indeterminate="true"/>
+
+ </FrameLayout>
+
+ <FrameLayout android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true">
+
+ <android.support.design.widget.CoordinatorLayout
+ android:id="@+id/coordinator_layout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom">
+
+ <RelativeLayout android:id="@+id/bottom_sheet"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="bottom"
+ android:minHeight="@dimen/preview_attribution_pane_expanded_height"
+ android:orientation="vertical"
+ android:background="@color/translucent_black"
+ app:behavior_peekHeight="@dimen/preview_attribution_pane_collapsed_height"
+ app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
+
+ <ImageButton android:id="@+id/preview_attribution_pane_arrow"
+ android:contentDescription="@string/expand_attribution_panel"
+ android:layout_width="48dp"
+ android:layout_height="48dp"
+ android:layout_alignParentEnd="true"
+ android:focusable="true"
+ android:clickable="true"
+ android:src="@drawable/ic_keyboard_arrow_up_white_24dp"
+ style="?android:attr/borderlessButtonStyle"/>
+
+ <TextView
+ android:id="@+id/preview_attribution_pane_title"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="start"
+ android:layout_marginStart="@dimen/preview_attribution_pane_content_side_margin"
+ android:layout_marginEnd="@dimen/preview_attribution_pane_content_side_margin"
+ android:layout_marginTop="@dimen/preview_attribution_pane_title_top_margin"
+ android:layout_toStartOf="@id/preview_attribution_pane_arrow"
+ android:ellipsize="end"
+ android:textAppearance="@style/AttributionPaneTitle"
+ android:forceHasOverlappingRendering="false"/>
+
+ <TextView android:id="@+id/preview_attribution_pane_subtitle1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/preview_attribution_pane_content_side_margin"
+ android:layout_marginEnd="@dimen/preview_attribution_pane_content_side_margin"
+ android:layout_marginTop="@dimen/preview_attribution_pane_subtitle1_top_margin"
+ android:layout_below="@id/preview_attribution_pane_title"
+ android:layout_toStartOf="@id/preview_attribution_pane_arrow"
+ android:textAppearance="@android:style/TextAppearance.Material.Body1"
+ android:forceHasOverlappingRendering="false"/>
+
+ <TextView android:id="@+id/preview_attribution_pane_subtitle2"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:textSize="@dimen/abc_text_size_caption_material"
+ android:layout_marginStart="@dimen/preview_attribution_pane_content_side_margin"
+ android:layout_marginEnd="@dimen/preview_attribution_pane_content_side_margin"
+ android:layout_marginTop="@dimen/preview_attribution_pane_subtitle2_top_margin"
+ android:layout_below="@id/preview_attribution_pane_subtitle1"
+ android:layout_toStartOf="@id/preview_attribution_pane_arrow"
+ android:textAppearance="@android:style/TextAppearance.Material.Caption"
+ android:forceHasOverlappingRendering="false"/>
+
+ <Button android:id="@+id/preview_attribution_pane_explore_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?android:attr/colorAccent"
+ android:layout_marginLeft="@dimen/preview_attribution_pane_explore_left_margin"
+ android:layout_marginStart="@dimen/preview_attribution_pane_explore_left_margin"
+ android:layout_marginTop="@dimen/preview_attribution_pane_explore_top_margin"
+ android:layout_marginBottom="@dimen/preview_attribution_pane_explore_bottom_margin"
+ android:layout_below="@id/preview_attribution_pane_subtitle2"
+ android:layout_gravity="center_vertical"
+ style="?android:attr/borderlessButtonStyle"
+ android:forceHasOverlappingRendering="false"/>
+
+ <View android:id="@id/spacer"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/preview_attribution_pane_spacer_height"
+ android:layout_below="@id/preview_attribution_pane_subtitle2"
+ android:visibility="gone"/>
+
+ </RelativeLayout>
+
+ </android.support.design.widget.CoordinatorLayout>
+
+ <android.widget.Toolbar android:id="@+id/toolbar"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_gravity="top"
+ android:paddingStart="@dimen/preview_toolbar_up_button_padding"
+ android:paddingEnd="@dimen/preview_toolbar_set_wallpaper_button_end_padding"
+ style="@style/TranslucentToolbarStyle"/>
+
+ </FrameLayout>
+</FrameLayout>
diff --git a/res/menu/menu_preview.xml b/res/menu/menu_preview.xml
index 26adc2d..8ab2fb3 100644
--- a/res/menu/menu_preview.xml
+++ b/res/menu/menu_preview.xml
@@ -22,4 +22,9 @@
android:showAsAction="ifRoom"
android:title="@string/configure_wallpaper"/>
+ <item
+ android:id="@+id/set_wallpaper"
+ android:title="@string/set_live_wallpaper"
+ android:showAsAction="always|withText" />
+
</menu>
diff --git a/res/values-sw720dp/dimes.xml b/res/values-sw720dp/dimes.xml
new file mode 100644
index 0000000..54380b9
--- /dev/null
+++ b/res/values-sw720dp/dimes.xml
@@ -0,0 +1,27 @@
+<!--
+ ~ Copyright (C) 2016 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>
+
+ <!-- Dimensions for the preview fragment. -->
+ <dimen name="preview_toolbar_up_button_padding">8dp</dimen>
+ <dimen name="preview_toolbar_set_wallpaper_button_padding">20dp</dimen>
+
+ <!-- Dimensions for the preview attribution pane. -->
+ <dimen name="preview_attribution_pane_content_side_margin">24dp</dimen>
+ <dimen name="preview_attribution_pane_explore_left_margin">10dp</dimen>
+
+</resources> \ No newline at end of file
diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml
new file mode 100644
index 0000000..7e1209c
--- /dev/null
+++ b/res/values-sw720dp/styles.xml
@@ -0,0 +1,21 @@
+<!--
+ ~ Copyright (C) 2016 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>
+
+ <style name="AttributionPaneTitle" parent="@android:style/TextAppearance.Material.Headline"/>
+
+</resources> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index d49e104..a81efb6 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -20,5 +20,7 @@
<resources>
<color name="live_wallpaper_thumbnail_background">#CC666666</color>
<color name="live_wallpaper_thumbnail_text_color">#FFFFFFFF</color>
+
+ <color name="translucent_black">#96000000</color>
</resources>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index d08e573..73792df 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -25,4 +25,19 @@
<dimen name="screen_margin_sides">0dip</dimen>
+ <!-- Dimensions for the preview fragment. -->
+ <dimen name="preview_toolbar_up_button_padding">0dp</dimen>
+ <dimen name="preview_toolbar_set_wallpaper_button_end_padding">12dp</dimen>
+
+ <!-- Dimensions for the preview attribution pane. -->
+ <dimen name="preview_attribution_pane_collapsed_height">48dp</dimen>
+ <dimen name="preview_attribution_pane_expanded_height">96dp</dimen>
+ <dimen name="preview_attribution_pane_content_side_margin">16dp</dimen>
+ <dimen name="preview_attribution_pane_title_top_margin">13dp</dimen>
+ <dimen name="preview_attribution_pane_subtitle1_top_margin">12dp</dimen>
+ <dimen name="preview_attribution_pane_subtitle2_top_margin">2dp</dimen>
+ <dimen name="preview_attribution_pane_explore_left_margin">2dp</dimen>
+ <dimen name="preview_attribution_pane_explore_top_margin">12dp</dimen>
+ <dimen name="preview_attribution_pane_explore_bottom_margin">16dp</dimen>
+ <dimen name="preview_attribution_pane_spacer_height">32dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3e9ac84..99e48e6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -46,4 +46,12 @@
<string name="which_wallpaper_option_home_screen">Home screen</string>
<!-- Option for setting the wallpaper on both the home screen and lock screen. -->
<string name="which_wallpaper_option_home_screen_and_lock_screen">Home screen and lock screen</string>
+
+ <!-- Content description for a button letting the user collapse a visual panel showing info
+ about the wallpaper being previewed. [CHAR LIMIT=none] -->
+ <string name="collapse_attribution_panel">Collapse wallpaper info panel</string>
+
+ <!-- Content description for a button letting the user expand a visual panel showing info about
+ the wallpaper being previewed. [CHAR LIMIT=none] -->
+ <string name="expand_attribution_panel">Expand wallpaper info panel</string>
</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 01747e7..361d824 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -21,28 +21,24 @@
<style name="LivePickerTheme" parent="@android:style/Theme.DeviceDefault.Settings" />
- <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>
+ <style name="Preview" parent="@style/Theme.AppCompat">
+
+ <!-- Set no title and no action bar because we use a toolbar instead. -->
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
- <item name="android:colorBackgroundCacheHint">@null</item>
- </style>
+ <item name="android:windowContentOverlay">@null</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>
+ <!-- Set status bar and navigation buttons to be translucent. -->
+ <item name="android:colorPrimaryDark">@color/translucent_black</item>
+ <item name="android:navigationBarColor">@color/translucent_black</item>
</style>
- <style name="ActionBarSetWallpaperStyle" parent="@android:style/Widget.DeviceDefault.ActionButton">
- <item name="android:textColor">#ffffffff</item>
- <item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
+ <style name="TranslucentToolbarStyle" parent="@style/Widget.AppCompat.Toolbar">
+ <item name="android:background">@color/translucent_black</item>
+ <item name="android:theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item>
</style>
+ <style name="AttributionPaneTitle" parent="@android:style/TextAppearance.Material.Subhead"/>
+
</resources> \ No newline at end of file