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

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

Merge "[DocsUI M3] Update padding for nav rail item" into main

parents 5a11ff7f 222f7ea8
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2024 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.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- By default the nav rail item has a grey background when it's focused, but we need the
     background to be put on the icon inside, so we override the focus background color to be
     transparent here.
     -->
    <item android:state_focused="true" android:drawable="@android:color/transparent" />
</selector>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@
                    android:id="@+id/nav_rail_burger_menu"
                    android:layout_width="@dimen/nav_rail_burger_icon_size"
                    android:layout_height="@dimen/nav_rail_burger_icon_size"
                    android:layout_marginBottom="24dp"
                    android:layout_marginBottom="@dimen/space_small_4"
                    app:iconPadding="0dp"
                    app:iconGravity="textStart"
                    app:iconTint="?attr/colorOnSurfaceVariant"
+7 −3
Original line number Diff line number Diff line
@@ -181,12 +181,16 @@
    </style>

    <style name="NavRailItemStyle" parent="">
        <item name="android:background">@drawable/nav_rail_item_background</item>
        <item name="android:paddingVertical">6dp</item>
        <!-- By default the nav rail item has a grey background when it's focused, but we need the
        background to be put on the icon inside, thus the defaultFocusHighlightEnabled=false here.
        -->
        <item name="android:defaultFocusHighlightEnabled">false</item>
        <item name="android:paddingHorizontal">@dimen/space_extra_small_4</item>
        <item name="android:paddingVertical">@dimen/space_extra_small_3</item>
    </style>

    <style name="NavRailItemTextStyle" parent="">
        <item name="android:layout_marginTop">4dp</item>
        <item name="android:layout_marginTop">@dimen/space_extra_small_2</item>
        <item name="android:textColor">@color/nav_rail_item_text_color</item>
        <item name="android:textAppearance">@style/NavRailItemTextAppearance</item>
    </style>