casolorz
casolorz

Reputation: 9574

What is the default TextAppearance of the NavigationView drawer items?

I would like to put a custom actionLayout item on my NavigationView drawer items. I want the text inside the actionLayout to look as close as possible to the exiting menu items on the NavigationView. I know I can use my own custom TextAppearance for NavigationView items but I would just prefer to reuse the one that NavigationView items are already using or at a minimum use it as a parent my custom one.

So what is the TextAppearance for NavigationView items?

Thanks.

Upvotes: 0

Views: 160

Answers (1)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 364654

It is the default style used by the NavigationView

<style name="Widget.MaterialComponents.NavigationView" parent="Widget.Design.NavigationView">
    <item name="itemTextAppearance">?attr/textAppearanceSubtitle2</item>
    ...
</style>

where:

<item name="textAppearanceSubtitle2">@style/TextAppearance.MaterialComponents.Subtitle2</item>

Upvotes: 2

Related Questions