summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKunhung Li <kunhungli@google.com>2019-02-26 11:33:27 +0800
committerKunhung Li <kunhungli@google.com>2019-03-15 18:24:08 +0800
commit561538a32805cda047d30e561e85ea277b9e2fba (patch)
treee6a12dc36f2849093566d0b5c445b7432aecfa9f
parentf74466ed9c1ad498711a1bf6291cbf0d61783bb4 (diff)
downloadandroid_packages_wallpapers_LivePicker-561538a32805cda047d30e561e85ea277b9e2fba.tar.gz
android_packages_wallpapers_LivePicker-561538a32805cda047d30e561e85ea277b9e2fba.tar.bz2
android_packages_wallpapers_LivePicker-561538a32805cda047d30e561e85ea277b9e2fba.zip
Update background color for top title bar and bottom panel
Bug: 126282838 Test: Manual test Change-Id: Id0b3970e67d72c1908130f8e3b75be5a22e9a145
-rw-r--r--res/drawable/gradient_background.xml22
-rw-r--r--res/layout/live_wallpaper_preview.xml8
-rw-r--r--res/values/colors.xml3
-rw-r--r--res/values/dimensions.xml3
-rw-r--r--res/values/styles.xml6
5 files changed, 37 insertions, 5 deletions
diff --git a/res/drawable/gradient_background.xml b/res/drawable/gradient_background.xml
new file mode 100644
index 0000000..0a5d692
--- /dev/null
+++ b/res/drawable/gradient_background.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+<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..f1d6159 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,7 +51,7 @@
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
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..0f3890c 100644
--- a/res/values/dimensions.xml
+++ b/res/values/dimensions.xml
@@ -29,6 +29,9 @@
<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_vertical_padding">13dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 8020103..caf3f1f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -27,8 +27,8 @@
<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>
@@ -37,7 +37,7 @@
</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>