DialogFragment fullscreen shows padding on sides

后端 未结 11 1595
囚心锁ツ
囚心锁ツ 2020-12-05 00:22

I am creating a custom DialogFragment that is displayed underneath the actionbar. So far everything works great. The layout parameters for dialog fragment are match_pa

11条回答
  •  时光取名叫无心
    2020-12-05 00:43

    https://groups.google.com/forum/#!topic/android-developers/NDFo9pF8sHY

    From Dianne Hackborn suggestion

    Use non-dialog theme as android.R.style.Theme or android.R.style.Theme_Light.

    Look @ the themes

    https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/themes.xml.

    Check this link

    http://developer.android.com/reference/android/app/DialogFragment.html

    DialogFragment picker = MyDialogFragment.newInstance();
    picker.setStyle( DialogFragment.STYLE_NORMAL, android.R.style.Theme );
    picker.show(getFragmentManager(), "MyDialogFragment");
    

提交回复
热议问题