In my app i have each activity with drawer, but when i set drawer in my Preference activity, my activity working fine, but drawer not appear.
here is my code..
In your activity's lowest hiearchical layout (content_main by default), add a FrameLayout named fragment_container. Set width and height to match_parent. Trick here is to create your fragment as this:
getFragmentManager()
.beginTransaction()
.replace(R.id.fragment_container, new MyFragment())
.commit();
So you basically don't add a fragment to the screen, you just replace a pre-defined layout with a fragment. This prevents the issues regarding the drawer and toolbar. If not, let me know so I can investigate further.