Merge "Update buttons in pin widget picker." into sc-dev
diff --git a/res/drawable/add_item_dialog_button_background.xml b/res/drawable/add_item_dialog_button_background.xml
deleted file mode 100644
index 1b4591f..0000000
--- a/res/drawable/add_item_dialog_button_background.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<inset
-    android:insetLeft="@dimen/pin_widget_button_inset_horizontal"
-    android:insetRight="@dimen/pin_widget_button_inset_horizontal"
-    android:insetTop="@dimen/pin_widget_button_inset_vertical"
-    android:insetBottom="@dimen/pin_widget_button_inset_vertical"
-    xmlns:android="http://schemas.android.com/apk/res/android">
-    <ripple
-        android:color="?android:attr/colorControlHighlight">
-        <item>
-            <shape android:tint="?android:attr/colorAccent" android:shape="rectangle">
-                <corners android:radius="18dp" />
-                <solid android:color="#FFFFFF"  />
-                <padding
-                    android:left="@dimen/pin_widget_button_padding_horizontal"
-                    android:top="@dimen/pin_widget_button_padding_vertical"
-                    android:right="@dimen/pin_widget_button_padding_horizontal"
-                    android:bottom="@dimen/pin_widget_button_padding_vertical" />
-            </shape>
-        </item>
-    </ripple>
-</inset>
\ No newline at end of file
diff --git a/res/drawable/full_rounded_colored_ripple.xml b/res/drawable/full_rounded_colored_ripple.xml
new file mode 100644
index 0000000..d89537c
--- /dev/null
+++ b/res/drawable/full_rounded_colored_ripple.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2021 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">
+    <ripple
+        android:color="?android:attr/colorControlHighlight">
+        <item>
+            <shape android:shape="rectangle">
+                <solid android:color="@color/button_bg"/>
+                <corners android:radius="28dp"/>
+            </shape>
+        </item>
+    </ripple>
+</inset>
\ No newline at end of file
diff --git a/res/layout/add_item_confirmation_activity.xml b/res/layout/add_item_confirmation_activity.xml
index 0a3fbbc..ddc9815 100644
--- a/res/layout/add_item_confirmation_activity.xml
+++ b/res/layout/add_item_confirmation_activity.xml
@@ -53,7 +53,7 @@
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:gravity="center_horizontal"
-            android:paddingVertical="8dp"
+            android:paddingTop="8dp"
             android:text="@string/add_item_request_drag_hint"
             android:textSize="14sp"
             android:textColor="?android:attr/textColorSecondary"
@@ -70,28 +70,33 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:gravity="end"
-            android:padding="8dp"
+            android:gravity="center_vertical|end"
+            android:paddingHorizontal="24dp"
+            android:paddingVertical="8dp"
             android:orientation="horizontal">
             <Button
-                style="@style/Widget.DeviceDefault.Button.Rounded.Colored"
+                style="@style/Button.FullRounded.Colored"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
+                android:layout_height="36dp"
                 android:paddingHorizontal="16dp"
-                android:onClick="onCancelClick"
-                android:text="@android:string/cancel" />
+                android:textSize="14sp"
+                android:textColor="@color/button_text"
+                android:text="@android:string/cancel"
+                android:onClick="onCancelClick"/>
 
             <Space
-                android:layout_width="4dp"
+                android:layout_width="8dp"
                 android:layout_height="wrap_content" />
 
             <Button
-                style="@style/Widget.DeviceDefault.Button.Rounded.Colored"
+                style="@style/Button.FullRounded.Colored"
                 android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
+                android:layout_height="36dp"
                 android:paddingHorizontal="16dp"
-                android:onClick="onPlaceAutomaticallyClick"
-                android:text="@string/add_to_home_screen"/>
+                android:textSize="14sp"
+                android:textColor="@color/button_text"
+                android:text="@string/add_to_home_screen"
+                android:onClick="onPlaceAutomaticallyClick"/>
         </LinearLayout>
     </com.android.launcher3.widget.AddItemWidgetsBottomSheet>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 2efa377..23ea9cf 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -287,10 +287,6 @@
         <item name="android:colorForeground">@color/all_apps_bg_hand_fill_dark</item>
     </style>
 
-    <style name="Widget.DeviceDefault.Button.Rounded.Colored" parent="@android:style/Widget.DeviceDefault.Button.Colored">
-        <item name="android:background">@drawable/add_item_dialog_button_background</item>
-    </style>
-
     <style name="Button.TopRounded.Bordered" parent="@android:style/Widget.Material.Button">
         <item name="android:background">@drawable/button_top_rounded_bordered_ripple</item>
         <item name="android:stateListAnimator">@null</item>
@@ -306,6 +302,11 @@
         <item name="android:stateListAnimator">@null</item>
     </style>
 
+    <style name="Button.FullRounded.Colored" parent="@android:style/Widget.Material.Button">
+        <item name="android:background">@drawable/full_rounded_colored_ripple</item>
+        <item name="android:stateListAnimator">@null</item>
+    </style>
+
     <style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
         <item name="widgetsTheme">@style/WidgetContainerTheme</item>
     </style>