Skip to content

Commit

Permalink
[Docs] Update doc to explain how to allow Top App Bar to grow taller …
Browse files Browse the repository at this point in the history
…in response to system font setting

PiperOrigin-RevId: 569238836
  • Loading branch information
dsn5ft committed Oct 2, 2023
1 parent bccbd4f commit a01a68d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/components/TopAppBar.md
Expand Up @@ -125,7 +125,8 @@ In the layout:
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/topAppBar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:title="@string/page_title"
app:menu="@menu/top_app_bar"
app:navigationIcon="@drawable/ic_close_24dp" />
Expand All @@ -145,6 +146,11 @@ In the layout:
</androidx.coordinatorlayout.widget.CoordinatorLayout>
```

**Note:** In order to allow your Top App Bar to grow taller when the system font
setting increases, you can use `android:layout_height="wrap_content"` +
`android:minHeight="?attr/actionBarSize"` on your `MaterialToolbar`, as shown in
the example above.

In `@menu/top_app_bar.xml`:

```xml
Expand Down

0 comments on commit a01a68d

Please sign in to comment.