首页 > 代码库 > Android Translucent Activity

Android Translucent 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>


本文出自 “Frank” 博客,请务必保留此出处http://zengfanhong.blog.51cto.com/8894077/1596219

Android Translucent Activity