Android 如何通过覆盖应用程序样式来隐藏特定活动样式中的标题栏
我想覆盖特定活动上的应用程序主题,但它不适合我 这是my Manifest.xml上的代码:Android 如何通过覆盖应用程序样式来隐藏特定活动样式中的标题栏,android,themes,titlebar,Android,Themes,Titlebar,我想覆盖特定活动上的应用程序主题,但它不适合我 这是my Manifest.xml上的代码: <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light" > <activity
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Sherlock.Light" >
<activity
android:theme="@style/MyTheme"
android:name="com.ssdevnet.Splash"
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.ssdevnet.Home"
android:label="@string/app_name" />
</application>
但它不是在我运行安卓2.3.6的手机上工作,而是在运行Jellybean的模拟器上工作,我需要在所有版本上工作的东西
我需要知道一些事情,因为我是android的新手:
我们能否定义一个全局主题,并在某些活动中覆盖该主题?如果是,我们可以使用什么方法
或者,如果我们的目标是活动而不是应用程序,我们必须为每个活动定义主题
我还想了解如何在应用程序中部署自定义主题。。如果有一些好的教程和参考资料,请分享
提前谢谢 在调用setContentView(…)和super.oncreate()之前,尝试使用setTheme(…),它在活动中应该可以正常工作
查看以了解更多信息。在调用setContentView(…)和super.oncreate()之前,请尝试使用setTheme(…),它在活动中应该可以正常工作
有关详细信息,请查看。已经尝试过。。没有解决我的问题已经试过了。。不能解决我的问题
<style name="MyTheme" parent="Theme.Sherlock.Light.DarkActionBar">
<item name="android:windowNoTitle">true</item>
</style>
requestWindowFeature(Window.FEATURE_NO_TITLE);// Removes title bar
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // Removes notification bar