JakeWharton/ActionBarSherlock — Issue #196: ActionBar not showing
Author: gabrielittner
Created: 2012-01-20 13:35:40+00:00
State: open

Hi
I'm using the Beta of ActionBarSherlock 4.0 and discovered something where I'm not sure whether it's a bug or wanted behaviour.

So I got a Fragment Activity (theme is Theme.Sherlock) which has an embedded DialogFragment. This is it's onCreathe mehtod:
@Override
public void onCreate (Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
DialogFragment newFragment = new MyDialogFragment();
newFragment.setArguments(getIntent().getExtras());
ft.add(android.R.id.content, newFragment, "dialog");
ft.commit();
}

The problem is the ActionBar isn't shown as long as I don't access it in any way at either the Activities onCreate or the Fragments onCreate. For example it is shown when I add this (Activity)

Log.i("", Boolean.toString(getSupportActionBar().isShowing()));

or (@ Fragment)

setHasOptionsMenu(true);

Keep on with your great work and if it isn't a bug I hope I didn't steal much of your time.