Adding a linear layout to Navigation drawer (ends up crashing with a ClassCastException)

后端 未结 5 1462
遇见更好的自我
遇见更好的自我 2020-12-10 07:06

I am trying to add a vertical linear layout (having a title, image, menu title, listview and an icon at the bottom)to the navigation drawer. However the app crashes displayi

5条回答
  •  轮回少年
    2020-12-10 07:34

    do 2 things:

    1. set gravity="START" to linearlayout not listview as LinearLayout is now drawer.
    2. at the time of closing the drawer call drawer.close(Gravity.START); don't pass listView object here.

提交回复
热议问题