Today, there is a situation where the Click event of the ListView in the drawer navigation bar does not respond to a click event.
Viewed under, originally because the drawer navigation bar fragment statement, placed in the content fragment before, causes the click action to be swallowed by the content fragment.
The solution is simple.
The fragment declaration of the drawer navigation bar is put in the end. The code is as follows
<Android.support.v4.widget.DrawerLayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:id= "@+id/main_drawerlayout"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent"> <!--Content Fragment - <FramelayoutAndroid:id= "@+id/main_content"Android:layout_width= "Match_parent"Android:layout_height= "Match_parent" /> <!--Drawer-type navigation bar - <FragmentAndroid:id= "@+id/main_navigator"Android:name= "Zhexian.app.zoschina.main.NavigatorFragment"Android:layout_width= "240DP"Android:layout_height= "Match_parent"android:layout_gravity= "Start" /></Android.support.v4.widget.DrawerLayout>
Later, the default overrides the previous.
Android Fix Setonitemclicklistener not responding