Android: how to hide ActionBar on certain activities

后端 未结 16 1943
遇见更好的自我
遇见更好的自我 2020-11-29 17:58

I\'ve developed a simple demo application with a splash screen a map and some regular screens.

I have an action bar at the top that contains a logo. It all looks fin

16条回答
  •  误落风尘
    2020-11-29 18:28

    The ActionBar usually exists along Fragments so from the Activity you can hide it

    getActionBar().hide();
    getActionBar().show();
    

    and from the Fragment you can do it

    getActivity().getActionBar().hide();
    getActivity().getActionBar().show();
    

提交回复
热议问题