美文网首页
全屏dialogfragment 状态栏黑

全屏dialogfragment 状态栏黑

作者: 木木阳光 | 来源:发表于2021-03-25 11:44 被阅读0次
    @Override
        public void onActivityCreated(@Nullable Bundle savedInstanceState) {
            Window window = getDialog().getWindow();
            window.requestFeature(Window.FEATURE_NO_TITLE);
    
            window.setDimAmount(0);
            window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
    
            super.onActivityCreated(savedInstanceState);
            window.setBackgroundDrawable(new ColorDrawable(0x00000000));
            window.setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
    
        }
    

    相关文章

      网友评论

          本文标题:全屏dialogfragment 状态栏黑

          本文链接:https://www.haomeiwen.com/subject/bbmlhltx.html