如何以编程方式在android中无色图像?

时间:2014-03-12 12:48:11

标签: android imageview

如何以编程方式无色imageview。用户拖动图像并查看预览图像而不是原始图像。感谢

enter image description here enter image description here

2 个答案:

答案 0 :(得分:2)

如果您想使imageview无色或透明,请使用此功能。

 imageview.getBackground().setAlpha(255); // start from 0 to 255.

OR

 imageview.setBackgroundResource(android.R.color.transparent);

答案 1 :(得分:0)

要使ImageView更透明,请使用ImageView.getBackground()。setAlpha(int);