Adding a linear layout to Navigation drawer (ends up crashing with a ClassCastException)
问题 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 displaying 'java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.v4.widget.DrawerLayout$LayoutParams' error. I am not sure if this is possible straight ways as I checked couple of links and the only close I got was this. Any help is appreciated. Thanks in advance. Here is my code