Merge "Add letter spacing setting for the lockscreen preview" into sc-dev
diff --git a/res/color/bottom_action_button_color_tint.xml b/res/color/bottom_action_button_color_tint.xml
index 26f91df..8f89fbe 100644
--- a/res/color/bottom_action_button_color_tint.xml
+++ b/res/color/bottom_action_button_color_tint.xml
@@ -17,8 +17,8 @@
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item
         android:state_selected="false"
-        android:color="@color/bottom_bar_icon_unchecked_color" />
+        android:color="?android:textColorTertiary" />
     <item
         android:state_selected="true"
-        android:color="?android:colorAccent" />
+        android:color="?android:textColorPrimary" />
 </selector>
\ No newline at end of file
diff --git a/res/drawable/bottom_action_button_background.xml b/res/drawable/bottom_action_button_background.xml
new file mode 100644
index 0000000..0a56ef1
--- /dev/null
+++ b/res/drawable/bottom_action_button_background.xml
@@ -0,0 +1,31 @@
+<?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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+    <item android:state_selected="false">
+        <shape>
+            <solid android:color="?android:colorBackground" />
+            <corners android:radius="@dimen/bottom_action_button_radius" />
+        </shape>
+    </item>
+    <item android:state_selected="true">
+        <shape>
+            <solid android:color="?androidprv:attr/colorAccentPrimary" />
+            <corners android:radius="@dimen/bottom_action_button_radius" />
+        </shape>
+    </item>
+</selector>
\ No newline at end of file
diff --git a/res/drawable/bottom_sheet_background.xml b/res/drawable/bottom_sheet_background.xml
index 7a09584..f3440bd 100644
--- a/res/drawable/bottom_sheet_background.xml
+++ b/res/drawable/bottom_sheet_background.xml
@@ -16,11 +16,8 @@
      limitations under the License.
 -->
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
-        android:shape="rectangle">
-    <solid android:color="@color/bottom_bar_background_color"/>
-    <corners
-        android:bottomLeftRadius="0dp"
-        android:bottomRightRadius="0dp"
-        android:topLeftRadius="@dimen/preview_bottom_sheet_corner_radius"
-        android:topRightRadius="@dimen/preview_bottom_sheet_corner_radius"/>
+    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
+    android:shape="rectangle">
+    <solid android:color="?androidprv:attr/colorSurface"/>
+    <corners android:radius="@dimen/preview_bottom_sheet_corner_radius"/>
 </shape>
\ No newline at end of file
diff --git a/res/layout/bottom_action_bar.xml b/res/layout/bottom_action_bar.xml
index fa8d2ea..cfee9d5 100644
--- a/res/layout/bottom_action_bar.xml
+++ b/res/layout/bottom_action_bar.xml
@@ -19,5 +19,4 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_gravity="bottom"
-    android:elevation="@dimen/bottom_action_bar_elevation"
     android:visibility="gone" />
diff --git a/res/layout/bottom_actions_layout.xml b/res/layout/bottom_actions_layout.xml
index e499f13..76889bc 100644
--- a/res/layout/bottom_actions_layout.xml
+++ b/res/layout/bottom_actions_layout.xml
@@ -24,17 +24,16 @@
     <androidx.coordinatorlayout.widget.CoordinatorLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_above="@id/action_tabs"
-        android:elevation="@dimen/bottom_action_bar_elevation">
+        android:layout_above="@id/action_tabs">
         <!-- Bottom sheet view should be a child view of CoordinatorLayout -->
         <FrameLayout
             android:id="@+id/action_bottom_sheet"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
+            android:layout_marginHorizontal="@dimen/bottom_sheet_margin"
             android:background="@drawable/bottom_sheet_background"
             android:theme="@style/WallpaperPicker.BottomPaneStyle"
             android:clickable="true"
-            android:elevation="@dimen/bottom_action_bar_elevation"
             app:behavior_peekHeight="@dimen/preview_attribution_pane_collapsed_height"
             app:layout_behavior="com.android.wallpaper.widget.BottomActionBar$QueueStateBottomSheetBehavior" />
     </androidx.coordinatorlayout.widget.CoordinatorLayout>
@@ -44,24 +43,19 @@
         android:id="@+id/action_tabs"
         android:layout_width="match_parent"
         android:layout_height="@dimen/bottom_navbar_height"
-        android:paddingTop="@dimen/bottom_action_bar_padding_top"
-        android:paddingHorizontal="@dimen/bottom_action_bar_padding_horizontal"
         android:clickable="true"
-        android:elevation="@dimen/bottom_action_bar_elevation"
-        android:background="@color/bottom_bar_background_color"
+        android:background="?android:colorBackground"
         android:theme="@style/BottomActionItemStyle"
         android:layout_alignParentBottom="true"
         android:layoutDirection="locale">
 
         <ImageView
             android:id="@+id/action_back"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_close_gm2_24px"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/bottom_action_bar_back"
-            android:tint="@color/bottom_action_button_color_tint"
+            android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_rotation"
             app:layout_constraintHorizontal_chainStyle="spread_inside"
@@ -69,13 +63,10 @@
 
         <ImageView
             android:id="@+id/action_rotation"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_slideshow_24dp"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/bottom_action_bar_slideshow_wallpaper"
-            android:tint="@color/bottom_action_button_color_tint"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_delete"
@@ -83,27 +74,21 @@
 
         <ImageView
             android:id="@+id/action_delete"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
-            android:src="@drawable/ic_delete_24px"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:contentDescription="@string/delete_live_wallpaper"
-            android:tint="@color/bottom_action_button_color_tint"
+            android:src="@drawable/ic_delete_24px"
             android:visibility="gone"
-            app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_information"
-            app:layout_constraintStart_toEndOf="@id/action_rotation" />
+            app:layout_constraintStart_toEndOf="@id/action_rotation"
+            app:layout_constraintTop_toTopOf="parent" />
 
         <ImageView
             android:id="@+id/action_information"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_info_gm2_24px"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/tab_info"
-            android:tint="@color/bottom_action_button_color_tint"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_edit"
@@ -111,13 +96,10 @@
 
         <ImageView
             android:id="@+id/action_edit"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_pan_zoom_24dp"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/bottom_action_bar_edit"
-            android:tint="@color/bottom_action_button_color_tint"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_customize"
@@ -125,13 +107,10 @@
 
         <ImageView
             android:id="@+id/action_customize"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_tune_black_24dp"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/tab_customize"
-            android:tint="@color/bottom_action_button_color_tint"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_download"
@@ -139,13 +118,10 @@
 
         <ImageView
             android:id="@+id/action_download"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_file_download_gm2_24px"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/bottom_action_bar_download"
-            android:tint="@color/bottom_action_button_color_tint"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_progress"
@@ -153,9 +129,8 @@
 
         <ProgressBar
             android:id="@+id/action_progress"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toStartOf="@id/action_apply"
@@ -163,13 +138,10 @@
 
         <ImageView
             android:id="@+id/action_apply"
-            android:layout_width="@dimen/bottom_action_button_size"
-            android:layout_height="@dimen/bottom_action_button_size"
-            android:padding="@dimen/bottom_action_button_padding"
+            android:layout_width="@dimen/bottom_action_button_width"
+            android:layout_height="@dimen/bottom_action_button_height"
             android:src="@drawable/ic_done_gm2_24px"
-            android:background="?android:attr/selectableItemBackgroundBorderless"
             android:contentDescription="@string/bottom_action_bar_apply"
-            android:tint="@color/bottom_action_button_color_tint"
             android:visibility="gone"
             app:layout_constraintTop_toTopOf="parent"
             app:layout_constraintEnd_toEndOf="parent"
diff --git a/res/layout/preview_customize_settings.xml b/res/layout/preview_customize_settings.xml
index 2a11495..9373705 100644
--- a/res/layout/preview_customize_settings.xml
+++ b/res/layout/preview_customize_settings.xml
@@ -23,6 +23,7 @@
     android:paddingHorizontal="@dimen/preview_attribution_pane_horizontal_padding"
     android:theme="@style/WallpaperPicker.CustomizationPaneStyle">
 
+    <!-- TODO(b/179127651): Figure out where these slices are generated to update them -->
     <androidx.slice.widget.SliceView
         android:id="@+id/settings_slice"
         android:layout_width="match_parent"
diff --git a/res/layout/preview_page_info.xml b/res/layout/preview_page_info.xml
index f0e4954..ce039cf 100644
--- a/res/layout/preview_page_info.xml
+++ b/res/layout/preview_page_info.xml
@@ -60,7 +60,7 @@
         android:forceHasOverlappingRendering="false"
         android:gravity="center_horizontal"
         android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small"
-        android:textSize="12dp"
+        android:textSize="12sp"
         android:textColor="@color/material_white_100"
         android:visibility="gone"/>
 
diff --git a/res/layout/wallpaper_info_view.xml b/res/layout/wallpaper_info_view.xml
index 352dc2a..d0b95dd 100644
--- a/res/layout/wallpaper_info_view.xml
+++ b/res/layout/wallpaper_info_view.xml
@@ -18,21 +18,17 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:gravity="center_horizontal"
     android:orientation="vertical"
-    android:paddingHorizontal="@dimen/wallpaper_info_pane_horizontal_padding"
-    android:paddingTop="@dimen/wallpaper_info_pane_top_padding"
-    android:paddingBottom="@dimen/wallpaper_info_pane_bottom_padding"
+    android:padding="@dimen/wallpaper_info_pane_padding"
     android:theme="@style/WallpaperPicker.BottomPaneStyle">
 
     <TextView
         android:id="@+id/wallpaper_info_title"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:gravity="center"
         android:lineHeight="24dp"
         android:textAppearance="@style/TitleTextAppearance"
-        android:textColor="@color/action_bar_bottom_sheet_text_color" />
+        android:textColor="?android:textColorPrimary" />
 
     <TextView
         android:id="@+id/wallpaper_info_subtitle1"
@@ -40,9 +36,8 @@
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/wallpaper_info_pane_subtitle1_top_margin"
         android:lineHeight="20dp"
-        android:gravity="center"
-        android:textColor="@color/action_bar_bottom_sheet_text_color"
-        android:textSize="16sp"
+        android:textColor="?android:textColorTertiary"
+        android:textSize="14sp"
         android:visibility="gone" />
 
     <TextView
@@ -50,15 +45,14 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/wallpaper_info_pane_subtitle2_top_margin"
-        android:lineHeight="16dp"
-        android:gravity="center"
-        android:textColor="@color/action_bar_bottom_sheet_text_color"
-        android:textSize="12sp"
+        android:lineHeight="20dp"
+        android:textColor="?android:textColorTertiary"
+        android:textSize="14sp"
         android:visibility="gone" />
 
     <Button
         android:id="@+id/wallpaper_info_explore_button"
-        style="@style/OutlinedButtonStyle"
+        style="@style/ExploreButtonStyle"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_marginTop="@dimen/wallpaper_info_pane_explore_button_top_margin"
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 555d45d..bb59056 100755
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -210,22 +210,20 @@
     <dimen name="full_preview_page_default_padding_bottom">32dp</dimen>
 
     <!-- Dimensions for the bottom bar. -->
-    <dimen name="bottom_navbar_height">76dp</dimen>
-    <dimen name="bottom_action_bar_padding_horizontal">4dp</dimen>
-    <dimen name="bottom_action_bar_padding_top">6dp</dimen>
+    <dimen name="bottom_navbar_height">96dp</dimen>
     <dimen name="bottom_action_bar_preview_info_padding_vertical">20dp</dimen>
-    <dimen name="bottom_action_bar_elevation">10dp</dimen>
-    <dimen name="bottom_action_button_size">48dp</dimen>
-    <dimen name="bottom_action_button_padding">12dp</dimen>
-    <dimen name="bottom_action_icon_size">24dp</dimen>
+    <dimen name="bottom_action_button_width">72dp</dimen>
+    <dimen name="bottom_action_button_height">48dp</dimen>
+    <dimen name="bottom_action_button_margin_top">24dp</dimen>
+    <dimen name="bottom_action_button_padding_horizontal">26dp</dimen>
+    <dimen name="bottom_action_button_radius">100dp</dimen>
+    <dimen name="bottom_action_icon_size">20dp</dimen>
 
-    <dimen name="wallpaper_info_pane_top_padding">20dp</dimen>
-    <dimen name="wallpaper_info_pane_bottom_padding">24dp</dimen>
-    <dimen name="wallpaper_info_pane_horizontal_padding">24dp</dimen>
-    <dimen name="wallpaper_info_pane_subtitle1_top_margin">14dp</dimen>
-    <dimen name="wallpaper_info_pane_subtitle2_top_margin">4dp</dimen>
-    <dimen name="wallpaper_info_pane_explore_button_top_margin">12dp</dimen>
-    <dimen name="wallpaper_info_pane_title_height">48dp</dimen>
+    <dimen name="bottom_sheet_margin">24dp</dimen>
+    <dimen name="wallpaper_info_pane_padding">24dp</dimen>
+    <dimen name="wallpaper_info_pane_subtitle1_top_margin">4dp</dimen>
+    <dimen name="wallpaper_info_pane_subtitle2_top_margin">24dp</dimen>
+    <dimen name="wallpaper_info_pane_explore_button_top_margin">50dp</dimen>
 
     <dimen name="option_border_width">2dp</dimen>
     <dimen name="option_selected_border_width">3dp</dimen>
diff --git a/res/values/picker_colors.xml b/res/values/picker_colors.xml
index 5c67345..4ad5eb1 100755
--- a/res/values/picker_colors.xml
+++ b/res/values/picker_colors.xml
@@ -61,8 +61,6 @@
     <color name="individual_tile_title_scrim_color">@color/translucent_black</color>
     <color name="individual_tile_title_text_color">@color/material_white_100</color>
 
-    <color name="individual_picker_background_color">@color/translucent_black</color>
-
     <color name="preview_pane_arrow_color">@color/material_white_100</color>
 
     <color name="toolbar_icon_color">@color/material_white_text</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 50bc3e3..5c48aa8 100755
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -127,6 +127,14 @@
         <item name="android:textColor">?android:attr/colorAccent</item>
     </style>
 
+    <style name="ExploreButtonStyle"  parent="OutlinedButtonStyle">
+        <item name="android:insetLeft">0dp</item>
+        <item name="android:insetRight">0dp</item>
+        <item name="android:minWidth">0dp</item>
+        <item name="android:minHeight">22sp</item>
+        <item name="android:textSize">16sp</item>
+    </style>
+
     <style name="ActionBarCheckboxStyle" parent="@android:style/Widget.DeviceDefault.CompoundButton.CheckBox">
         <item name="android:textColor">?android:attr/colorPrimary</item>
     </style>
@@ -143,8 +151,6 @@
 
     <!-- Preview attribution pane styles -->
     <style name="WallpaperPicker.BottomPaneStyle" parent="@android:style/Theme.DeviceDefault.Settings">
-        <item name="android:textColorPrimary">@color/material_white_100</item>
-        <item name="android:textColorSecondary">@color/white_70_alpha</item>
         <item name="tabTextAppearance">@style/WallpaperPicker.Preview.TextAppearance.NoAllCaps</item>
         <item name="tabIndicatorColor">?android:attr/textColorPrimary</item>
         <item name="tabGravity">fill</item>
@@ -227,7 +233,10 @@
 
     <!-- Bottom action item -->
     <style name="BottomActionItemStyle">
-        <item name="android:tint">@color/material_grey500</item>
+        <item name="android:tint">@color/bottom_action_button_color_tint</item>
+        <item name="android:background">@drawable/bottom_action_button_background</item>
+        <item name="android:paddingHorizontal">@dimen/bottom_action_button_padding_horizontal</item>
+        <item name="android:layout_marginTop">@dimen/bottom_action_button_margin_top</item>
     </style>
 
     <!-- Option tiles -->