Merge "Update buttons in pin widget picker." into sc-dev am: 8bd4ef6122

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14678281

Change-Id: Ie52b48d6a2fb2bc991e4e0b56102e4ce5a1bfe2f
This commit is contained in:
Alina Zaidi
2021-06-01 19:51:19 +00:00
committed by Automerger Merge Worker
4 changed files with 50 additions and 38 deletions
@@ -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>
@@ -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>
+17 -12
View File
@@ -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>
+5 -4
View File
@@ -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>