最近刚学Android,请大家多多指教。我想把程序标题隐藏。于是我就引用Andriod自定义的theme:
AndroidManifest.xml
<application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
上面确实可以做到,但是我自己也定义了一部分样式,于是我想让我的继承这个样式:
styles.xml
<style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen"></style>AndroidManifest.xml
<application android:theme="@style/AppBaseTheme" />为什么这样却没效果。android主题theme布局样式
AndroidManifest.xml
<application android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
上面确实可以做到,但是我自己也定义了一部分样式,于是我想让我的继承这个样式:
styles.xml
<style name="AppBaseTheme" parent="@android:style/Theme.NoTitleBar.Fullscreen"></style>AndroidManifest.xml
<application android:theme="@style/AppBaseTheme" />为什么这样却没效果。android主题theme布局样式
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="myandroid.test"
android:versionCode="1"
android:versionName="1.0" > <uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/> <application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="myandroid.test.LoginActivity"
android:screenOrientation="landscape"
android:label="@string/app_name"
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>res/values/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="AppBaseTheme" parent="@android:style/Theme.Black.NoTitleBar.Fullscreen">
</style>
</resources>
复制错了。应该AppBaseTheme
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppBaseTheme" >