I guess I'm gonna answer my question. The latest navigationView
produces its default android:layout_height
at almost 18dp
when you choose "wrap_content"
. So, you must choose the android:layout_height
that you want for your navigationView
or simply make android:layout_height="match_parent"
.
<android.support.design.widget.NavigationView
android:layout_width="320dp"
android:layout_height="550dp"
android:id="@+id/navigation_view_admin"
android:layout_gravity="start">
</android.support.design.widget.NavigationView>
Anyways, it's height automatically increases when you add an item in the navigation drawer.
Lastly, Use addDrawerListener()
instead of setDrawerListener()
as Luxi Liu said.