2015-02-05 158 views
0

我想擺脫活動標題欄,並嘗試添加@android: style/Theme.NoTitleBar to activity and android:theme =「@ android:style/Theme.NoTitleBar.Fullscreen」to the manifest file,but I keep getting the error:java.lang.IllegalStateException:You need to use a Theme.AppCompat主題(或後代)與此活動。似乎沒有任何幫助。ANDROID:無法將android:theme =「@ android:style/Theme.Black.NoTitleBar.Fullscreen」添加到清單文件

任何幫助將是美妙的:)

感謝。

回答

2

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.

相關問題