DialogFragment has blue line on top in Android 4.4.2

强颜欢笑 提交于 2019-11-30 13:03:01

I guess it appears when there is still a title bar. I just hid the title bar and it works just fine..

    dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);

Use this changes:

on your DialogFragment:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    setStyle(android.support.v4.app.DialogFragment.STYLE_NO_FRAME, R.style.my_dialog_style);
}

on your style R.style.my_dialog_style add the following:

<item name="android:windowContentOverlay">@null</item>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!