diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-03-19 06:22:17 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-03-19 06:22:17 +0000 |
commit | 374190b0fda67417e3d022e088e94315101f28e1 (patch) | |
tree | fed27b83092a70f8e6e9aece06bdcac712401fbb | |
parent | 5839f306f3c6b32079d2835c07092cb9d009da0a (diff) | |
parent | 43768e4547482774a062cb10f2defa4242b222f6 (diff) | |
download | android_packages_wallpapers_LivePicker-374190b0fda67417e3d022e088e94315101f28e1.tar.gz android_packages_wallpapers_LivePicker-374190b0fda67417e3d022e088e94315101f28e1.tar.bz2 android_packages_wallpapers_LivePicker-374190b0fda67417e3d022e088e94315101f28e1.zip |
Snap for 5386257 from 43768e4547482774a062cb10f2defa4242b222f6 to qt-release
Change-Id: I39dba5a7777775bd7444c548107001661dedc7e2
-rw-r--r-- | res/drawable/btn_outlined_mtrl_shape.xml | 33 | ||||
-rw-r--r-- | res/drawable/gradient_background.xml (renamed from res/drawable/btn_outlined_material.xml) | 14 | ||||
-rw-r--r-- | res/layout/live_wallpaper_preview.xml | 15 | ||||
-rw-r--r-- | res/layout/page_info.xml | 17 | ||||
-rw-r--r-- | res/layout/page_settings.xml | 8 | ||||
-rw-r--r-- | res/values/colors.xml | 3 | ||||
-rw-r--r-- | res/values/dimensions.xml | 5 | ||||
-rw-r--r-- | res/values/styles.xml | 37 |
8 files changed, 56 insertions, 76 deletions
diff --git a/res/drawable/btn_outlined_mtrl_shape.xml b/res/drawable/btn_outlined_mtrl_shape.xml deleted file mode 100644 index bc6cff2..0000000 --- a/res/drawable/btn_outlined_mtrl_shape.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2019 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. ---> - -<!-- Used as the canonical button shape. --> - -<inset xmlns:android="http://schemas.android.com/apk/res/android" - android:insetLeft="@*android:dimen/button_inset_horizontal_material" - android:insetTop="@*android:dimen/button_inset_vertical_material" - android:insetRight="@*android:dimen/button_inset_horizontal_material" - android:insetBottom="@*android:dimen/button_inset_vertical_material"> - <shape android:shape="rectangle"> - <corners android:radius="?android:attr/buttonCornerRadius"/> - <padding android:bottom="@*android:dimen/button_padding_vertical_material" - android:left="@*android:dimen/button_padding_horizontal_material" - android:right="@*android:dimen/button_padding_horizontal_material" - android:top="@*android:dimen/button_padding_vertical_material"/> - <stroke android:width="@dimen/btn_outlined_stroke" - android:color="@*android:color/primary_device_default_light"/> - </shape> -</inset> diff --git a/res/drawable/btn_outlined_material.xml b/res/drawable/gradient_background.xml index 7e26ea5..0a5d692 100644 --- a/res/drawable/btn_outlined_material.xml +++ b/res/drawable/gradient_background.xml @@ -13,10 +13,10 @@ See the License for the specific language governing permissions and limitations under the License. --> - -<ripple xmlns:android="http://schemas.android.com/apk/res/android" - android:color="?android:attr/colorControlHighlight"> - <item android:id="@android:id/mask" - android:drawable="@*android:drawable/btn_default_mtrl_shape"/> - <item android:drawable="@drawable/btn_outlined_mtrl_shape"/> -</ripple> +<shape xmlns:android="http://schemas.android.com/apk/res/android" + android:shape="rectangle"> + <gradient + android:angle="90" + android:startColor="@android:color/transparent" + android:endColor="@color/translucent_blue_dark"/> +</shape> diff --git a/res/layout/live_wallpaper_preview.xml b/res/layout/live_wallpaper_preview.xml index 05ac0c9..2d895fe 100644 --- a/res/layout/live_wallpaper_preview.xml +++ b/res/layout/live_wallpaper_preview.xml @@ -35,6 +35,12 @@ </FrameLayout> + <View + android:layout_width="match_parent" + android:layout_height="@dimen/preview_gradient_background_height" + android:layout_gravity="top" + android:background="@drawable/gradient_background"/> + <FrameLayout android:layout_width="match_parent" android:layout_height="match_parent" @@ -45,18 +51,15 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="@color/translucent_black" + android:background="@color/translucent_blue_light" android:orientation="vertical"> <com.google.android.material.tabs.TabLayout android:id="@+id/tablayout" android:layout_width="match_parent" android:layout_height="wrap_content" - app:tabTextAppearance="@style/LivePicker.TextAppearance.Tab.NoAllCaps" - app:tabIndicatorColor="?android:attr/textColorPrimary" - app:tabGravity="fill" - app:tabMaxWidth="0dp" - android:visibility="gone"/> + style="@style/TabLayoutStyle" + android:visibility="gone" /> <com.android.wallpaper.livepicker.widget.ConstraintViewPager android:id="@+id/viewpager" diff --git a/res/layout/page_info.xml b/res/layout/page_info.xml index 33a11bf..001b110 100644 --- a/res/layout/page_info.xml +++ b/res/layout/page_info.xml @@ -28,8 +28,7 @@ android:forceHasOverlappingRendering="false" android:gravity="center_horizontal" android:singleLine="true" - android:textAppearance="@android:style/TextAppearance.DeviceDefault.Large" - android:textSize="@dimen/abc_text_size_subhead_material" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Title" android:visibility="gone"/> <TextView @@ -39,8 +38,7 @@ android:layout_marginTop="@dimen/preview_attribution_pane_author_top_margin" android:forceHasOverlappingRendering="false" android:gravity="center_horizontal" - android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" - android:textColor="?android:attr/textColorPrimary" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Subhead" android:visibility="gone"/> <TextView @@ -50,8 +48,7 @@ android:layout_marginTop="@dimen/preview_attribution_pane_description_top_margin" android:forceHasOverlappingRendering="false" android:gravity="center_horizontal" - android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" - android:textSize="@dimen/abc_text_size_caption_material" + android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Caption" android:visibility="gone"/> <LinearLayout @@ -61,11 +58,11 @@ android:layout_marginTop="@dimen/preview_attribution_pane_explore_top_margin" android:orientation="horizontal"> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/preview_attribution_pane_explore_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - style="@style/LivePicker.Button.Outlined" + style="@style/OutlinedButtonStyle" android:text="@string/explore_further" android:visibility="gone"/> @@ -76,11 +73,11 @@ android:layout_weight="1" android:visibility="gone"/> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/preview_attribution_pane_set_wallpaper_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - style="@style/LivePicker.Button.Colored" + style="@style/UnelevatedButtonStyle" android:text="@string/set_live_wallpaper"/> </LinearLayout> diff --git a/res/layout/page_settings.xml b/res/layout/page_settings.xml index bc8c2ff..f5d0b89 100644 --- a/res/layout/page_settings.xml +++ b/res/layout/page_settings.xml @@ -17,20 +17,18 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:gravity="center_horizontal" android:orientation="vertical" - android:paddingHorizontal="@dimen/preview_attribution_pane_horizontal_padding" - android:paddingVertical="@dimen/preview_attribution_pane_vertical_padding"> + android:paddingHorizontal="@dimen/preview_attribution_pane_horizontal_padding"> <androidx.slice.widget.SliceView android:id="@+id/settings_slice" android:layout_width="match_parent" android:layout_height="wrap_content"/> - <Button + <com.google.android.material.button.MaterialButton android:id="@+id/preview_attribution_pane_set_wallpaper_button" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/preview_attribution_pane_explore_top_margin" - style="@style/LivePicker.Button.Colored" + style="@style/UnelevatedButtonStyle" android:text="@string/set_live_wallpaper"/> </LinearLayout> diff --git a/res/values/colors.xml b/res/values/colors.xml index a81efb6..f89e4ff 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -21,6 +21,7 @@ <color name="live_wallpaper_thumbnail_background">#CC666666</color> <color name="live_wallpaper_thumbnail_text_color">#FFFFFFFF</color> - <color name="translucent_black">#96000000</color> + <color name="translucent_blue_light">#66133659</color> + <color name="translucent_blue_dark">#99133659</color> </resources> diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml index 528901b..2d01a68 100644 --- a/res/values/dimensions.xml +++ b/res/values/dimensions.xml @@ -29,8 +29,11 @@ <dimen name="preview_toolbar_start_padding">0dp</dimen> <dimen name="preview_toolbar_end_padding">12dp</dimen> + <!-- Dimensions for the gradient area. --> + <dimen name="preview_gradient_background_height">128dp</dimen> + <!-- Dimensions for the preview attribution pane. --> - <dimen name="preview_attribution_pane_horizontal_padding">16dp</dimen> + <dimen name="preview_attribution_pane_horizontal_padding">24dp</dimen> <dimen name="preview_attribution_pane_vertical_padding">13dp</dimen> <dimen name="preview_attribution_pane_author_top_margin">12dp</dimen> <dimen name="preview_attribution_pane_description_top_margin">2dp</dimen> diff --git a/res/values/styles.xml b/res/values/styles.xml index 8020103..26d8511 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -19,44 +19,55 @@ <resources> - <style name="LivePickerTheme" parent="@android:style/Theme.DeviceDefault.Settings" /> + <style name="LivePickerTheme" parent="@android:style/Theme.DeviceDefault.Settings"/> - <style name="Preview" parent="@style/Theme.AppCompat.NoActionBar"> + <style name="Preview" parent="@style/Theme.MaterialComponents.NoActionBar"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowDisablePreview">true</item> <!-- Set status bar and navigation buttons to be translucent. --> - <item name="android:statusBarColor">@color/translucent_black</item> - <item name="android:navigationBarColor">@color/translucent_black</item> + <item name="android:statusBarColor">@android:color/transparent</item> + <item name="android:navigationBarColor">@color/translucent_blue_light</item> <item name="android:colorAccent">@*android:color/accent_device_default_light</item> <item name="colorAccent">@*android:color/accent_device_default_light</item> + <item name="colorOnPrimary">@*android:color/primary_device_default_light</item> + <item name="android:buttonCornerRadius">@dimen/btn_corner_radius</item> </style> <style name="TranslucentToolbarStyle" parent="@style/Widget.AppCompat.Toolbar"> - <item name="android:background">@color/translucent_black</item> + <item name="android:background">@android:color/transparent</item> <item name="android:theme">@style/ThemeOverlay.AppCompat.Dark.ActionBar</item> </style> - <style name="LivePicker.TextAppearance.Tab.NoAllCaps" - parent="@android:style/TextAppearance.DeviceDefault.Widget.TabWidget"> + <style name="TabLayoutStyle" parent="@style/Widget.Design.TabLayout"> + <item name="tabTextAppearance">@style/LivePicker.TextAppearance.Tab.NoAllCaps</item> + <item name="tabIndicatorColor">?android:attr/textColorPrimary</item> + <item name="tabGravity">fill</item> + <item name="tabMaxWidth">0dp</item> + </style> + + <style name="LivePicker.TextAppearance.Tab.NoAllCaps" parent="@android:style/TextAppearance.DeviceDefault.Widget.TabWidget"> <item name="android:textAllCaps">false</item> </style> <style name="AlertDialogStyle" parent="@android:style/Theme.DeviceDefault.Light.Dialog.Alert"/> - <style name="LivePicker.Button.Colored" - parent="@android:style/Widget.DeviceDefault.Button.Colored"> + <style name="UnelevatedButtonStyle" parent="@android:style/Widget.DeviceDefault.Button.Colored"> + <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Widget.Button</item> <item name="android:textColor">?android:textColorPrimary</item> <item name="android:textAllCaps">false</item> - <item name="android:stateListAnimator">@null</item> + <item name="backgroundTint">?android:colorAccent</item> + <item name="rippleColor">@color/mtrl_btn_ripple_color</item> </style> - <style name="LivePicker.Button.Outlined" parent="@style/LivePicker.Button.Colored"> - <item name="android:background">@drawable/btn_outlined_material</item> + <style name="OutlinedButtonStyle" parent="@style/Widget.MaterialComponents.Button.OutlinedButton"> + <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Widget.Button</item> + <item name="android:textColor">?android:textColorPrimary</item> + <item name="android:textAllCaps">false</item> + <item name="strokeColor">@*android:color/primary_device_default_light</item> </style> - </resources> |