Answer the question
In order to leave comments, you need to log in
How to set height for divider in application theme?
It is necessary in the Navigation Drawer to use separators with a height of 0.5 dp and a certain color.
It turned out to set the color (listDivider attribute), but it is not possible to find the theme attribute that is responsible for the height.
I tried adding dividerHeight to the theme, but it didn't change anything.
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.Dragonfly" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">@color/purple_500</item>
<item name="colorPrimaryVariant">@color/purple_700</item>
<item name="colorOnPrimary">@color/white</item>
<item name="colorSecondary">@color/teal_200</item>
<item name="colorSecondaryVariant">@color/teal_700</item>
<item name="colorOnSecondary">@color/black</item>
<item name="android:statusBarColor" tools:targetApi="l">@color/white</item>
<item name="materialButtonStyle">@style/Button.Action</item>
<item name="buttonStyle">@style/Button.Action</item>
<item name="android:windowBackground">@color/white</item>
<item name="android:background">@color/white</item>
<item name="android:forceDarkAllowed" tools:targetApi="q">false</item>
<item name="android:listDivider">@color/geyser</item>
</style>
</resources>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question