Reputation: 2354
I have set alpha to my relative layout in following way,
holder.layoutMenuItem.getBackground().setAlpha(alpha*255/100);
It is working perfect in all versions except verion 5 - lollipop. Any one is having solution to this issue?
Upvotes: 2
Views: 2120
Reputation: 4981
You can try this:
view.setBackgroundColor(Color.parseColor("#**238974"));
Where *
is your Alpha level.
In my case view.setAlpha((float)0.3);
worked perfectly too.
Upvotes: 1