问题
I am using the code below and it's working fine on api 23 but not on another device on api 16(Jelly Bean) .
Style:
<style name="NavigationViewStyle">
<item name="android:textSize">20sp</item> <!-- menu item text size-->
<item name="android:listPreferredItemHeightSmall">40dp</item><!-- menu item height-->
</style>
And then, apply this style to NavigationView using app:theme
<android.support.design.widget.NavigationView
...
...
app:theme="@style/NavigationViewStyle"
...
...
</android.support.design.widget.NavigationView>
回答1:
You should use "android:listPreferredItemHeightSmall"
without "android" nameSpace for older versions.
来源:https://stackoverflow.com/questions/35453698/listpreferreditemheightsmall-is-not-working-on-api-16