1.定义颜色
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<color name="transparent">#0000000</color>
</resources>
2.定义Style
<style name="AtyBgTransparent">
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
</style>
3.在Manifest文件中为activity添加Theme属性
android:theme="@style/<span style="font-family: Arial, Helvetica, sans-serif;">AtyBgTransparent</span><span style="font-family: Arial, Helvetica, sans-serif;">" </span>