how to programmatically show and hide action bar on one activity

前端 未结 7 805
闹比i
闹比i 2020-12-10 10:12

i got this one activity wherein i need to hide actionbar on the login interface then once login it will show the action bar.i got one activity only. if i put getActionBar on

相关标签:
7条回答
  • 2020-12-10 11:03

    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();
    
    0 讨论(0)
提交回复
热议问题