Merge "Update buttons in pin widget picker." into sc-dev

This commit is contained in:
Alina Zaidi 2021-06-01 17:34:43 +00:00 committed by Android (Google) Code Review
commit 8bd4ef6122
4 changed files with 50 additions and 38 deletions

View File

@ -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>

View File

@ -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>

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>

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>