使所有活动全屏幕 - 没有标题栏没有活动吧 [英] Make all activities full screen - no title bar no activity bar
问题描述
我需要从我的全部使用活动删除操作栏/标题栏。目前,我申请
I need to remove action bar/ title bar from all activities I am using. Currently I applied
android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
在在活动清单文件,但这只是从主要活动将删除上面说的其他活动保持不变。任何解决方案
in Manifest file under activity but this only removes above said from the main activity other activity remains the same. Any solution
在活动全部code:
<activity
android:name="com.dss.ms.MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen">
完整清单文件
Full Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dss.ms"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
>
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="com.dss.ms.MainActivity"
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.com.dss.ms.Single"
android:label="@string/title_activity_single" >
</activity>
<activity
android:name="com.dss.ms.Index"
android:label="@string/title_activity_index" >
</activity>
<activity
android:name="com.dss.ms.da"
android:label="@string/title_activity_players_2" >
</activity>
<activity
android:name="com.dss.ms.FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/title_activity_fullscreen"
android:theme="@style/FullscreenTheme" >
</activity>
<activity
android:name="com.dss.ms.Score"
android:label="@string/title_activity_score" >
</activity>
</application>
</manifest>
最后编辑---
Final Edit ---
我得到了它的工作,当活动来延长ActionBarActivity的问题就出现了。我附上参考。 [<一href="http://stackoverflow.com/questions/18063395/actionbarcompat-java-lang-illegalstateexception-you-need-to-use-a-theme-appcom%5d%5b1%5d">http://stackoverflow.com/questions/18063395/actionbarcompat-java-lang-illegalstateexception-you-need-to-use-a-theme-appcom][1]
I got it worked, The problem arises when activity extends ActionBarActivity. I am attaching the reference. [http://stackoverflow.com/questions/18063395/actionbarcompat-java-lang-illegalstateexception-you-need-to-use-a-theme-appcom][1]
在我最后的code我使用的:
In my final code I am using :
android:theme="@android:style/Theme.Holo.Light.NoActionBar.Fullscreen"
在我的清单文件的应用程序。谢谢你。
under application in my Manifest file. Thank you.
推荐答案
您必须设置主题,或在你的proiject的清单文件等应用标签应用程序:
You have to set Theme or your application in application tag of your proiject's manifest file like:
<application
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen" >
</application>
这篇关于使所有活动全屏幕 - 没有标题栏没有活动吧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!