How can I hide action bar for certain fragment? I have searched for the answer at stackoverflow, but I have only found a solution, which involves disabling action bar for main a
Put getSupportActionBar().hide()
before setContentView
in the Activity that holds the fragments.
Also add this: ((AppCompatActivity) getActivity()).getSupportActionBar().hide()
in the fragments before inflating layout. This works if you are using this ActionBarActivity
.It also removes my lags in hiding action bar