My android app has tab navigation using an action bar. It works well, but it bothers me that during the first boot of the app, a small default action bar briefly shows up before being replaced by the real, tab-navigation action bar. My onCreate starts like this:
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
setContentView(R.layout.activity_main);
//Set up the actionbar
final ActionBar actionBar = getActionBar();
.
.
.
What do I have to do so that the real actionbar will be initialized without a small default one briefly showing before it does on startup?
Thanks
if you're using action bar sherlock and you want to toggle this from a FragmentActivity, then you call
put this for your activity manifest definition:
then inside your oncreate do this to show the actual theme you want used:
Hide during startup
After you can show it again with ...
It should be the same with native ActionBar of Android.
you should use this line in manifest and don't use getActionBar()
and once it's finished in the main Activity use below or nothing