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 this code in fragment in which you want to hide toolbar...
@Override public void onResume() { super.onResume(); ((AppCompatActivity)getActivity()).getSupportActionBar().hide(); } @Override public void onStop() { super.onStop(); ((AppCompatActivity)getActivity()).getSupportActionBar().show(); }