summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-06-01 23:12:54 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-06-01 23:12:54 +0000
commitf0036a508a0364f1c64f8be8c3b80ef765bd6683 (patch)
tree7c506a088879268683e1fc36c2803cebf6476c6d
parent342afecda34926a0c3006c2b5beb84c236864538 (diff)
parent2247316d60eacf0a89f4cb5b9b6650337e10c97c (diff)
downloadandroid_packages_wallpapers_LivePicker-f0036a508a0364f1c64f8be8c3b80ef765bd6683.tar.gz
android_packages_wallpapers_LivePicker-f0036a508a0364f1c64f8be8c3b80ef765bd6683.tar.bz2
android_packages_wallpapers_LivePicker-f0036a508a0364f1c64f8be8c3b80ef765bd6683.zip
Snap for 5626731 from 2247316d60eacf0a89f4cb5b9b6650337e10c97c to qt-release
Change-Id: I7d118948baf67806c0882014089e00b960a35517
-rw-r--r--res/drawable/btn_colored_background.xml35
-rw-r--r--res/drawable/btn_transparent.xml21
-rw-r--r--res/drawable/btn_transparent_background.xml26
-rw-r--r--res/layout/page_info.xml4
-rw-r--r--res/layout/page_settings.xml2
-rw-r--r--res/values-night/colors.xml21
-rw-r--r--res/values-night/styles.xml4
-rw-r--r--res/values/colors.xml2
-rw-r--r--res/values/dimensions.xml2
-rw-r--r--res/values/styles.xml27
10 files changed, 130 insertions, 14 deletions
diff --git a/res/drawable/btn_colored_background.xml b/res/drawable/btn_colored_background.xml
new file mode 100644
index 0000000..8e1a95e
--- /dev/null
+++ b/res/drawable/btn_colored_background.xml
@@ -0,0 +1,35 @@
+<?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.
+-->
+
+<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">
+ <ripple android:color="@color/ripple_button_color">
+ <item>
+ <shape android:shape="rectangle"
+ android:tint="@*android:color/btn_colored_background_material">
+ <corners android:radius="?android:attr/buttonCornerRadius" />
+ <solid android:color="@android:color/white" />
+ <padding android:left="@*android:dimen/button_padding_horizontal_material"
+ android:top="@*android:dimen/button_padding_vertical_material"
+ android:right="@*android:dimen/button_padding_horizontal_material"
+ android:bottom="@*android:dimen/button_padding_vertical_material" />
+ </shape>
+ </item>
+ </ripple>
+</inset>
diff --git a/res/drawable/btn_transparent.xml b/res/drawable/btn_transparent.xml
new file mode 100644
index 0000000..b8e0d1e
--- /dev/null
+++ b/res/drawable/btn_transparent.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:drawable="@drawable/btn_transparent_background"
+ android:insetBottom="5dp"
+ android:insetTop="5dp"/> \ No newline at end of file
diff --git a/res/drawable/btn_transparent_background.xml b/res/drawable/btn_transparent_background.xml
new file mode 100644
index 0000000..9eb3bfc
--- /dev/null
+++ b/res/drawable/btn_transparent_background.xml
@@ -0,0 +1,26 @@
+<?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.
+-->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+ <item>
+ <shape android:shape="rectangle">
+ <stroke android:width="1dp" android:color="@android:color/white"/>
+ <corners android:radius="?android:attr/buttonCornerRadius"/>
+ </shape>
+ </item>
+ <item android:drawable="?selectableItemBackground"/>
+</layer-list> \ No newline at end of file
diff --git a/res/layout/page_info.xml b/res/layout/page_info.xml
index f7baad0..f436bc9 100644
--- a/res/layout/page_info.xml
+++ b/res/layout/page_info.xml
@@ -71,7 +71,7 @@
android:layout_marginBottom="@dimen/preview_attribution_pane_button_bottom_margin"
android:orientation="horizontal">
- <com.google.android.material.button.MaterialButton
+ <Button
android:id="@+id/preview_attribution_pane_explore_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -86,7 +86,7 @@
android:layout_weight="1"
android:visibility="gone"/>
- <com.google.android.material.button.MaterialButton
+ <Button
android:id="@+id/preview_attribution_pane_set_wallpaper_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/res/layout/page_settings.xml b/res/layout/page_settings.xml
index d770af3..5142928 100644
--- a/res/layout/page_settings.xml
+++ b/res/layout/page_settings.xml
@@ -31,7 +31,7 @@
android:layout_height="0dp"
android:layout_weight="1"/>
- <com.google.android.material.button.MaterialButton
+ <Button
android:id="@+id/preview_attribution_pane_set_wallpaper_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
new file mode 100644
index 0000000..38d4297
--- /dev/null
+++ b/res/values-night/colors.xml
@@ -0,0 +1,21 @@
+<?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.
+-->
+
+<resources>
+ <color name="translucent_black">#B3000000</color>
+
+ <color name="ripple_button_color">@*android:color/ripple_material_dark</color>
+</resources>
diff --git a/res/values-night/styles.xml b/res/values-night/styles.xml
index 30a4207..3e788b4 100644
--- a/res/values-night/styles.xml
+++ b/res/values-night/styles.xml
@@ -18,5 +18,9 @@
-->
<resources>
+ <style name="ButtonStyle" parent="@style/ButtonStyle.Base">
+ <item name="android:textColor">?android:textColorPrimaryInverse</item>
+ </style>
+
<style name="AlertDialogStyle" parent="@android:style/Theme.DeviceDefault.Dialog.Alert"/>
</resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 152755f..d7a184a 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -22,5 +22,7 @@
<color name="live_wallpaper_thumbnail_text_color">#FFFFFFFF</color>
<color name="translucent_black">#66000000</color>
+
+ <color name="ripple_button_color">@*android:color/ripple_material_light</color>
</resources>
diff --git a/res/values/dimensions.xml b/res/values/dimensions.xml
index a1ccd3f..f23bd7f 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -42,6 +42,8 @@
<dimen name="preview_attribution_pane_author_top_margin">0dp</dimen>
<dimen name="preview_attribution_pane_description_height">34dp</dimen>
<dimen name="preview_attribution_pane_button_bottom_margin">8dp</dimen>
+ <dimen name="preview_attribution_pane_button_height">48dp</dimen>
+ <dimen name="preview_attribution_pane_button_padding">16dp</dimen>
<!-- Dimensions for the ConstraintViewPager on preview activity. -->
<dimen name="preview_viewpager_round_radius">12dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c0705b2..abec6c0 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -21,7 +21,7 @@
<style name="LivePickerTheme" parent="@android:style/Theme.DeviceDefault.Settings"/>
- <style name="Preview" parent="@style/Theme.MaterialComponents.NoActionBar">
+ <style name="Preview" parent="@style/Theme.AppCompat.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowDisablePreview">true</item>
@@ -30,11 +30,10 @@
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@color/translucent_black</item>
- <item name="android:colorAccent">@*android:color/accent_device_default_light</item>
- <item name="colorAccent">@*android:color/accent_device_default_light</item>
+ <!-- Button corner -->
+ <item name="android:buttonCornerRadius">@*android:dimen/config_buttonCornerRadius</item>
- <item name="colorPrimary">@*android:color/accent_device_default_light</item>
- <item name="colorOnPrimary">@*android:color/primary_device_default_light</item>
+ <item name="colorAccent">@*android:color/accent_device_default</item>
</style>
<style name="TranslucentToolbarStyle" parent="@style/Widget.AppCompat.Toolbar">
@@ -55,17 +54,23 @@
<style name="AlertDialogStyle" parent="@android:style/Theme.DeviceDefault.Light.Dialog.Alert"/>
- <style name="ButtonStyle" parent="@style/Widget.MaterialComponents.Button">
+ <style name="ButtonStyle.Base" parent="@style/Widget.AppCompat.Button.Colored">
+ <item name="android:background">@drawable/btn_colored_background</item>
<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:padding">@dimen/preview_attribution_pane_button_padding</item>
+ <item name="android:minHeight">@dimen/preview_attribution_pane_button_height</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:ellipsize">end</item>
</style>
- <style name="OutlinedButtonStyle" parent="@style/Widget.MaterialComponents.Button.OutlinedButton">
- <item name="android:textAppearance">@android:style/TextAppearance.DeviceDefault.Widget.Button</item>
+ <style name="ButtonStyle" parent="@style/ButtonStyle.Base">
+ <item name="android:textColor">?android:textColorPrimary</item>
+ </style>
+
+ <style name="OutlinedButtonStyle" parent="@style/ButtonStyle">
+ <item name="android:background">@drawable/btn_transparent</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>
<style name="WallpaperSliceStyle" parent="@style/Widget.SliceView">