Using
<item android:id="@+id/nav_ad" android:title="@null" app:actionLayout="@layout/sidebar_ad" />
I can use my own layout and create my own ad inside NavigationView. However, the height of the list item is apparently fixed at the same value, which means that it is not possible to individually change the height of an individual item.
View view = mNavView.getMenu().findItem(R.id.nav_ad).getActionView() returns the custom view I created, however view.getParent() returns null, which means that it is not possible to get a reference to the setMinimumHeight() container setMinimumHeight() on it.
I even thought about using reflection to hack the NavigationMenuAdapter , but since this is a private inner class, I donβt even know where to start.
Uses another drawer library / records own drawer view just for walking?
android admob navigationview android-navigationview android-support-design
Saren arterius
source share