我需要将我的活动设置为全屏无状态栏和操作栏将Android活动设置为全屏
这里是我的代码基于我有谷歌。我加入NoTitleBar和全屏
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar" >
<activity
android:name="com.examples.hello.MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
的问题是我对Theme.AppCompat应用迷恋。我如何解决这个问题?
我的日志
> 04-09 11:22:35.570: E/AndroidRuntime(3931):
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.examples.hello/com.examples.hello.MainActivity}:
> java.lang.IllegalStateException: You need to use a Theme.AppCompat
> theme (or descendant) with this activity.
刚刚从项目属性中删除库。删除MainActivity中与碎片有关的所有代码。将布局从fragment.xml移至activity_main.xml。 –
发布您的崩溃日志。你的活动是否扩展了ActionBarActivity? – Libin
哦..是的。我应该改变它吗? – user3487657