Skip to content

Commit

Permalink
[NavigationRail] Add label padding for when the label is long enough …
Browse files Browse the repository at this point in the history
…to reach the sides of the nav rail

PiperOrigin-RevId: 584069016
  • Loading branch information
imhappi authored and leticiarossi committed Nov 20, 2023
1 parent 144b515 commit 2439dc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
android:duplicateParentState="true"
android:ellipsize="end"
android:maxLines="1"
android:paddingStart="@dimen/m3_navigation_rail_label_padding_horizontal"
android:paddingEnd="@dimen/m3_navigation_rail_label_padding_horizontal"
android:textSize="@dimen/mtrl_navigation_rail_text_size" />
<TextView
android:id="@id/navigation_bar_item_large_label_view"
Expand All @@ -61,6 +63,8 @@
android:ellipsize="end"
android:maxLines="1"
android:textSize="@dimen/mtrl_navigation_rail_active_text_size"
android:paddingStart="@dimen/m3_navigation_rail_label_padding_horizontal"
android:paddingEnd="@dimen/m3_navigation_rail_label_padding_horizontal"
android:visibility="invisible" />
</com.google.android.material.internal.BaselineLayout>
</merge>
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,6 @@
<dimen name="m3_navigation_rail_item_active_indicator_width">@dimen/m3_comp_navigation_rail_active_indicator_width</dimen>
<dimen name="m3_navigation_rail_item_active_indicator_height">@dimen/m3_comp_navigation_rail_active_indicator_height</dimen>
<dimen name="m3_navigation_rail_item_active_indicator_margin_horizontal">4dp</dimen>
<dimen name="m3_navigation_rail_label_padding_horizontal">2dp</dimen>

</resources>

0 comments on commit 2439dc0

Please sign in to comment.