Hide application title bar in Android pager

Can anyone tell how to hide the application title bar in the pager fragment. enter image description here

Android Pager

+5
source share
2 answers

That should be enough:

ActionBar bar = getActionBar(); // you might need to use getSupportActionBar() based on your project setup bar.setDisplayShowTitleEnabled(false); bar.setDisplayShowHomeEnabled(false); 
+13
source

Warren is right. And if you want to hide this in your topic, you can do this by inheriting a topic that does not display it:

  • For pre-cell styles:

     <style name="HiddenActionBar" parent="@android:style/Theme"> </style> 
  • For Honeycomb +:

     <style name="HiddenActionBar" parent="@android:style/Theme.Holo.NoActionBar"> </style> 

I personally prefer this method, because it frees your classes from code that matches the UI, and it can be easily installed for each Activity by changing the theme of your application in the manifest.

+3
source

Source: https://habr.com/ru/post/950150/


All Articles