Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3683bf6c authored by Alina Zaidi's avatar Alina Zaidi Committed by Automerger Merge Worker
Browse files

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

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

Change-Id: Ie52b48d6a2fb2bc991e4e0b56102e4ce5a1bfe2f
parents f14a4682 8bd4ef61
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
<?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
+28 −0
Original line number Diff line number Diff line
<?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
+17 −12
Original line number Diff line number Diff line
@@ -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
Original line number Diff line number Diff line
@@ -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>