I have a DialogFragment subclass and would like to open
up as full screen in certain conditions (e.g. on a small screen).

The current app is a viewpager with 3 fragments.

The code below replaces the active fragment - instead of
taking up the full screen.

   InputDialog inputDialog = new InputDialog(); // DialogFragment

            FragmentTransaction transaction = 
fragmentManager.beginTransaction();

            
transaction.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);

            // To make it fullscreen, use the 'content' root view as the 
container
            // for the fragment, which is always the root view for the 
activity
            //
            transaction.add( android.R.id.content, inputDialog );
            
            transaction.addToBackStack(null);
            
            transaction.commit();


i understand android.R.id.content is the root element for an activity.


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to