Last active
June 13, 2016 11:34
-
-
Save aldakur/3747223e9e85c7a709b80dda84cc971b to your computer and use it in GitHub Desktop.
ActionBar - Show & Hide
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//When the class extends from Activity | |
ActionBar actionBar = getActionBar(); | |
actionBar.hide(); //hide | |
actinBar.show(); //Show | |
//When the class extends from AppCompatActivity | |
getSupportActionBar().hide(); //hide | |
getSupportActionBar().show(); //show | |
//In FragmentActivity, you need to change the FragmentActivity to an ActionBarActivity, | |
//which is a subclass of FragmentActivity. | |
//Or change to AppCompatActivity | |
getSupportActionBar().hide(); //hide | |
getSupportActionBar().show(); //show |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment