AndroidStudio学习笔记-07隐藏标题栏和状态栏

1、在values的styles.xml文件中添加子标签,如下:

<style name="NoTitle" parent="Theme.AppCompat.DayNight.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowFullscreen">true</item>
</style>


2、在清单文件AndroidManifest.xml中,添加如下引用

android:theme="@style/NoTitle"

3.最终完成后效果如下:

猜你喜欢

转载自blog.csdn.net/a451319296/article/details/107525284