style 实现全屏和AppCompat does not support the current theme features错误的解决

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_29654885/article/details/72673528
由于目前都是使用Appcompat的主题,当创建工程的时候就自动写好了 Appcompat 的style,
由于 application 的 theme 是 appcompat,其 activity 就必须要是 appcompat 的主题,所以当我们 acticity 使用android 的 style 或者不是继承 appcompat 的主题,会报错。
AppCompat does not support the current theme features

所以为了实现全屏,我们只有自定义一个 style,让其继承 appcompat,并且 windowNotitle 为 true,windowFullScreen也为 true。这样就实现了全屏,并且没有 actionbar。

猜你喜欢

转载自blog.csdn.net/qq_29654885/article/details/72673528