How to create a DialogFragment without title?

后端 未结 6 1812
时光说笑
时光说笑 2020-11-29 15:50

I\'m creating a DialogFragment to show some help messages regarding my app. Everything works fine besides one thing: There is a black stripe at the top of the window that sh

6条回答
  •  一生所求
    2020-11-29 16:19

    public class LoginDialog extends DialogFragment {   
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
            View view = inflater.inflate(R.layout.login_dialog, null);
            getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE);
            return view;
        }   
    }
    

提交回复
热议问题