1

Null Pointer during orientation change on DrawerLayout

view story
linux-howto

http://stackoverflow.com – I have this weird scenario wherein after the onOrientationChange I got a Null Pointer Error, my DrawerLayout that has been initialized on onCreateView before the change. mDrawerLayout = (DrawerLayout) rootView.findViewById(R.id.drawer_layout); And I am getting null on this point, if(mDrawerList.getChildAt(position)!=null){ } private void selectItem(int position, boolean InstanceStateNull) { Log.d("selectItem", "inside"); //savePosition("position", position); // update the main content by replacing fragments Toast.makeText(getActivity(), "SELECT IT (HowTos)