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

Commit 543e5e36 authored by Wenbo Jie (介文博)'s avatar Wenbo Jie (介文博) Committed by Android (Google) Code Review
Browse files

Merge "[DocsUI M3] Update styles for nav item action icon" into main

parents 50ae92d9 0aa79f8a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@
     limitations under the License.
-->

<!-- TODO(b/379776735): remove this file after M3 uplift -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false"
        android:alpha="@dimen/root_icon_disabled_alpha"
+7 −17
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

<com.android.documentsui.sidebar.RootItemView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:minHeight="@dimen/drawer_item_height"
@@ -68,22 +69,11 @@

    </LinearLayout>

    <FrameLayout
        android:id="@+id/action_icon_area"
        android:layout_width="@dimen/button_touch_size"
        android:layout_height="@dimen/button_touch_size"
        android:layout_marginStart="@dimen/drawer_item_action_icon_margin_start"
        android:duplicateParentState="true"
        android:visibility="gone">

        <ImageView
    <com.google.android.material.button.MaterialButton
        android:id="@+id/action_icon"
            android:focusable="false"
            android:layout_width="@dimen/root_action_icon_size"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:scaleType="centerInside"/>

    </FrameLayout>
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        style="@style/DrawerItemActionIconStyle"
        android:visibility="gone"/>

</com.android.documentsui.sidebar.RootItemView>
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@
    <dimen name="root_spacer_padding">0dp</dimen>
    <!-- block end -->
    <dimen name="root_action_icon_size">24dp</dimen>
    <!-- TODO(b/379776735): remove this after M3 uplift -->
    <dimen name="root_icon_disabled_alpha">?android:attr/disabledAlpha</dimen>
    <dimen name="check_icon_size">30dp</dimen>
    <dimen name="zoom_icon_size">24dp</dimen>
+14 −3
Original line number Diff line number Diff line
@@ -140,10 +140,16 @@

    <style name="DrawerStyle" parent="">
        <item name="android:background">?attr/colorSurfaceContainer</item>
        <item name="android:layout_marginHorizontal">@dimen/drawer_margin_horizontal</item>
        <item name="android:layout_marginTop">@dimen/drawer_margin_top</item>
        <item name="android:layout_marginBottom">@dimen/drawer_margin_bottom</item>
        <!-- Use padding together with the "outsideOverlay" scrollbar style to to make sure the
            scrollbar appears on the edge of the container, and scrollbar trigger area doesn't
            affect the hover effect of the views (e.g. action icon) on the edge.
         -->
        <item name="android:paddingHorizontal">@dimen/drawer_margin_horizontal</item>
        <item name="android:paddingTop">@dimen/drawer_margin_top</item>
        <item name="android:paddingBottom">@dimen/drawer_margin_bottom</item>
        <item name="android:dividerHeight">@dimen/drawer_item_vertical_margin</item>
        <item name="android:scrollbarStyle">outsideOverlay</item>
        <item name="android:clipToPadding">false</item>
    </style>

    <style name="DrawerItemStyle" parent="">
@@ -151,4 +157,9 @@
        <item name="android:paddingEnd">4dp</item>
        <item name="android:background">@drawable/root_item_background</item>
    </style>

    <style name="DrawerItemActionIconStyle" parent="@style/Widget.Material3.Button.IconButton">
        <item name="android:layout_marginStart">@dimen/drawer_item_action_icon_margin_start</item>
        <item name="strokeColor">?attr/colorSecondary</item>
    </style>
</resources>
+0 −2
Original line number Diff line number Diff line
@@ -69,8 +69,6 @@
        <item name="alertDialogTheme">@style/AlertDialogTheme</item>
        <item name="autoCompleteTextViewStyle">@style/AutoCompleteTextViewStyle</item>
        <item name="bottomSheetDialogTheme">@style/BottomSheetDialogStyle</item>
        <item name="materialButtonStyle">@style/MaterialButton</item>
        <item name="materialButtonOutlinedStyle">@style/MaterialOutlinedButton</item>
        <item name="materialCardViewStyle">@style/CardViewStyle</item>
        <item name="materialAlertDialogTheme">@style/MaterialAlertDialogTheme</item>
        <item name="queryBackground">@color/menu_search_background</item>
Loading