Transparent Activity

在AndroidManifest.xml中相应的activity标签处添加如下内容即可得到透明Activity:
android:theme="@android:style/Theme.Translucent"

示例如下:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="cn.anarticle.app" >

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="cn.anarticle.app.MainActivity"
            android:label="@string/app_name"
            android:theme="@android:style/Theme.Translucent">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


你可能感兴趣的:(Activity,transparent)