gpt4 book ai didi

java - ANDROID:无法将 android:theme ="@android:style/Theme.Black.NoTitleBar.Fullscreen"添加到 list 文件

转载 作者:行者123 更新时间:2023-12-02 05:00:22 25 4
gpt4 key购买 nike

我想摆脱 Activity 标题栏并尝试仅添加

@android:style/Theme.NoTitleBar 到 Activity 和

android:theme="@android:style/Theme.NoTitleBar.Fullscreen" 到 list 文件。

但我不断收到错误:

java.lang.IllegalStateException:您需要在此 Activity 中使用 Theme.AppCompat 主题(或后代)。

似乎没有什么帮助。

任何帮助都会很棒:)

谢谢。

最佳答案

https://developer.android.com/training/basics/actionbar/styling.html

Note: If you are using the Support Library APIs for the action bar, then you must use (or override) the Theme.AppCompat family of styles (rather than the Theme.Holo family, available in API level 11 and higher). In doing so, each style property that you declare must be declared twice: once using the platform's style properties (the android: properties) and once using the style properties included in the Support Library (the appcompat.R.attr properties—the context for these properties is actually your app). See the examples below for details.

关于java - ANDROID:无法将 android:theme ="@android:style/Theme.Black.NoTitleBar.Fullscreen"添加到 list 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28334407/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com