0

I have created an application. There is a login activity so I just want to remove the action bar at runtime. What should I do ???

See Screenshot

You can see in the image blue action bar. I just want to remove this only.

Thanks

Sunny
  • 3,134
  • 1
  • 17
  • 31

1 Answers1

1

If you are using the AppCompatActivity, then you can perform action:

// to hide the action bar
getSupportActionBar().hide();
// to show the action bar
getSupportActionBar().show();

If you are using the Activity, then you can perform action:

// to hide the action bar
getActionBar().hide();
// to show the action bar
getActionBar().show();

Note: This work only of You are using the Theme with Action Bar.

Sunny
  • 3,134
  • 1
  • 17
  • 31