DialogFragment fullscreen shows padding on sides

后端 未结 11 1591
囚心锁ツ
囚心锁ツ 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:57

    DialogFragment (when not told explicitly), will use its inner styles that will wrap your custom layout in it (no fullscreen, etc.).

    No need to create custom theme for this problem. Just use this method and set style and theme of your choosing:

    /* theme is optional, I am using leanback... */
    setStyle(STYLE_NORMAL, R.style.AppTheme_Leanback);
    

提交回复
热议问题