1、res/values/中新建mystyle.xml文件,内容如下:
<resources>
<style name="Transparent">
<item name="android:windowBackground">@color/transparent_background</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@+android:style/Animation.Translucent</item>
</style>
</resources>
2、res/values/中新建color.xml文件,内容如下:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="transparent_background">#50000000</color>
</resources>
3、AndroidManifest.xml中引用1中新建样式
<activity android:name="touch" android:theme="@style/Transparent"/>
则activity变为透明的了,呵呵