I want to change the opacity of some cell of my ListView
.
I don't know the color to apply, only the alpha, so I can't use :
v.setBackgroundColor(0x44FFFFFF);
I have to use somethings like :
v.setAlpha(50);
I want to change the opacity of some cell of my ListView
.
I don't know the color to apply, only the alpha, so I can't use :
v.setBackgroundColor(0x44FFFFFF);
I have to use somethings like :
v.setAlpha(50);
Yes you can use setAlpha
.
The function View.setAlpha(float)
expects a value between 0 and 1.
See here: http://developer.android.com/reference/android/view/View.html#setAlpha%28float%29
You can try this too:
myView.setBackgroundColor(getResources()
.getColor(R.color.translucent));//here translucent = "#80FFFF" ARGB format
Please refer here for more details on transparency values.