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
Change your Theme from the manifest file for the desire Activity...
Theme.AppCompat.NoActionBar
or
Theme.AppCompat.Light.NoActionBar
Programmatically you can Invisible your Toolbar by this line of codes
if you extend your activity by Activity class then use below line of code to show or hide the Toolbar
getActionBar().hide();
getActionBar().show();
and if you extend your activty from AppCompact Activity then use
For class extending Activity :
getActionBar().hide(); getActionBar().show(); For class extending AppCompatActivity :
getSupportActionBar().hide();
getSupportActionBar().show();