美文网首页Android开发经验谈Android开发Android知识
一键隐藏标题栏!【安卓UI小技巧】

一键隐藏标题栏!【安卓UI小技巧】

作者: 亲爱的村姑 | 来源:发表于2016-07-23 11:29 被阅读172次

在style.xml 加入
<item name="android:windowNoTitle">true</item>

按理说可以把标题栏隐藏,但是当style是appCompat的某个主题的时候,这样自定义style好像不起作用,重新运行标题栏还在。在网上找了半天,终于找到解决方法了 -
把android:windowNoTitle改为 windowNoTitle ,重新运行就OK拉!

例:

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="windowNoTitle">true</item>
</style>```

相关文章

网友评论

    本文标题:一键隐藏标题栏!【安卓UI小技巧】

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