Search code examples
androidandroid-fragmentsandroid-actionbarandroid-actionbar-compat

Full Screen Fragment and Non Full Screen Fragment on Same Activity


I have two fragments, A and B.

I want A to show on top of B (this is working fine, no problem here using a relative layout).

I also want to be able to slide Fragment A down to reveal fragment B. The kicker is that I want fragment A to show on top of the action bar. I'm using the new ActionBar compat library from Google.

How do I do this? I essentially want the opposite of action bar overlay (underlay?).


Solution

  • Turns out I should have been thinking of this as a DialogFragment instead.

    I turned Fragment A into a DialogFragment and added this to it's class:

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setStyle(STYLE_NO_FRAME, android.R.style.Theme_Holo_Light);
    }