看过许多方法,还是这种简单省事,欢迎大家点击收藏! 1.代码示例: (1) <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas./apk/res/android"> //只要在原本的颜色进制位前面加上85,就可以得到透明度为85的窗口 <solid android:color="#85ffffff"/> <corners android:topLeftRadius="10dp" android:topRightRadius="10dp" android:bottomLeftRadius="10dp" android:bottomRightRadius="10dp"/> </shape> 透明度: 透明度分为256个等级,即 0 - 256,0就是透明,255就是不透明 ; 透明度 (透明)0 –> 255(不透明) 对应着16进制 (透明)00 –> FF(不透明) |
|