按下面几个步骤来:
1 创建颜色文件:res-values-colors.xml,加入如下代码
<?xml version="1.0" encoding="utf-8"?>
<resources>
?<color name="transparent">#9000</color>
</resources>
?
2 创建style文件:res-values-styles.xml,加入如下代码:
<?xml version="1.0" encoding="utf-8"?>
<resources>
?<style name="translucent">
??<item name="android:windowBackground">@color/transparent</item>
??<item name="android:windowIsTranslucent">true</item>
??<item name="android:windowAnimationStyle">@+android:style/Animation.Translucent</item>
?</style>
</resources>
?
3 在AndroidManirest.xml中加入使用Theme,如下:
??<activity android:name=".MainMenu" android:theme="@style/translucent"
android:label="@string/app_name"
???>
??</activity>
?
以上三步都实现就可以实现透明的效果了。
?
利用这个技术,可以实现下图的效果了,你懂的:
http://blog.sina.com.cn/s/blog_4b9b6ad00100o7wn.html