2

I have a FragmentActivity and a few fragments in my application.

In some conditions , i'll pop a dialog from activity, it will be fullscreen but it should stay below main action bar. is it possible ? ( I want to keep main action bar visible )

My Dialog Style

<style name="FullScreen" parent="@android:style/Theme.Holo.Light">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">false</item>
    <item name="android:backgroundDimEnabled">false</item>
</style>

Dialog

public class FDialog extends Dialog implements OnClickListener{

Context mContext;

public FDialog(Context context) {
    super(context,R.style.FullScreen);
    mContext = context;
}

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.dialog_content);
}

Thanks

dracula
  • 4,413
  • 6
  • 26
  • 31

1 Answers1

0

After searching in the website, I found this answer that could help with your problem. It suggests to implement the Dialog with a Fragment. That way you have access to action bar easy. On the other hand, you have the disadvantage to work with the fragments flow, but it also very easy.

Hope it helps!

Show Dialog nearly full screen in my case (With ActionBar & overlay)

Community
  • 1
  • 1
nespapu
  • 802
  • 8
  • 23