<Button android:background="#e0000000" ... />
<Button android:background="#00000000" ... />
//Java代码 View v = findViewById(R.id.content);//找到你要设透明背景的layout 的id v.getBackground().setAlpha(100);//0~255透明度值 ,值越小越透明
<Button android:background="@android:color/transparent"/>
<color name="translucent">#55000000</color>
<style name="myDialog" parent="@android:style/Theme.Dialog"> <item name="android:windowFrame">@null</item> <item name="android:windowIsFloating">true</item> <item name="android:windowIsTranslucent">true</item> <item name="android:windowNoTitle">true</item> <item name="android:windowBackground">@color/translucent</item> <item name="android:backgroundDimEnabled">false</item> <item name="android:windowCloseOnTouchOutside">false</item> </style>
<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>
<?xml version="1.0" encoding="utf-8"?> <resources> <color name="transparent_background">#50000000</color> </resources>
<activity android:name=".TransparentActivity" android:theme="@style/Transparent"> </activity>
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setTheme(R.style.Transparent);
setContentView(R.layout.transparent);
// ... ...
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有