推荐安卓开发神器(里面有各种UI特效和android代码库实例)
在menu上定义style,限制menu的区域把不用的区域隐藏起来。Styles.xml如下:
<resources>
<style name="Theme.Translucent" parent="android:style/Theme.Translucent">
<item name="android:windowBackground">@drawable/translucent_background</item>
<item name="android:windowNoTitle">true</item>
<item name="android:colorForeground">#fff</item>
</style>
</resources>
在AndroidManifest.xml文件activity元素中一定要加上这样一句:android:theme=“@style/Theme.Translucent”。这句话的意思是使用我们自定义的name为Theme.Translucent风格。