Android Studio - Action Bar remove

前端 未结 8 1690
时光说笑
时光说笑 2020-12-24 03:05

I\'m trying to remove/disable the ActionBar. I tried to put in the Manifest:

         


        
8条回答
  •  轮回少年
    2020-12-24 03:27

    You hide action bar by with different ways.

    1.action bar hidden through the manifest xml file (non Java Programming), then the easy way is to add the following attribute in Activity tag:

     android:theme="@style/Theme.NoActionBar"
    

    If custom Theme is created then it is convenient to create another style extending the custom theme.

     false
     true
    

    or

    ActionBar actionBar = getActionBar(); OR getSupportActionBar();
    actionBar.hide();
    
    getSupportActionBar().hide(); 
      or 
    getActionBar().hide();
    

提交回复
热议问题