如何将按钮的背景设置为透明颜色,比如透明蓝色,而不是实心蓝色?
当我使用button.setBackgroundColor(Color.BLUE)
时,它会将其设置为实心蓝色。
如何将按钮的背景设置为透明颜色,比如透明蓝色,而不是实心蓝色?
当我使用button.setBackgroundColor(Color.BLUE)
时,它会将其设置为实心蓝色。
int
参数,每个参数的取值范围为0到255。button.setBackgroundColor(Color.argb(125, 0, 0, 255));