全屏的自定义主题自定义、全屏、主题

2023-09-06 01:58:32 作者:深爱着对方*

我的应用程序需要显示为全屏幕,现在我知道如何使用,以增加这个功能到应用程序标签在Mainfest

My app need to show as full screen, now I know how to add this feature into application tag in Mainfest using

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

不过,我有我自己的主题名为codeFONT,而我不能使用两个主题,在相同的应用程序。我怎么能在我的资源文件中添加此功能为我自己的风格标签?有没有这样的机器人:风格标签。 plz帮助。 THX。

However, I have my own theme called "CodeFont", and I cannot use two themes at the same application. How I can add this feature into my own style tag in my resources file? there is no such android:style tag. plz help. thx.

推荐答案

通过使用默认的主题,像这样创建自定义主题

Create your custom theme by using default theme, like this

全屏窗口

<style name="generalnotitle" parent="general">
    <item name="android:windowFullscreen">true</item>
</style>

NoTitle

<style name="generalnotitle" parent="general">
    <item name="android:windowNoTitle">true</item>
</style>