IllegalArgumentException: Window type can not be changed after the window is added

前端 未结 5 702
走了就别回头了
走了就别回头了 2021-01-03 21:21

I\'ve tried the advice here, the advice here, the advice here, I\'ve commented out the onAttachedToWindow() in my Base Activity. I have two Activities inheriting from this

5条回答
  •  情歌与酒
    2021-01-03 21:47

    Try to use this for window :

    requestWindowFeature(Window.FEATURE_NO_TITLE);
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                         WindowManager.LayoutParams.FLAG_FULLSCREEN);
    setContentView(R.layout.activity_adjectives);
    

提交回复
热议问题