Reputation: 2817
i know their many question about this and i have tried some of them but none is working for me. I have layout file, the layout structure is like this
l2 is on top of l1, i want to change the transparency l2 around 40 to 5o percent dynamically. So that the layout l1 which is behind l2 little visible. Please Help
Upvotes: 2
Views: 48
Reputation: 16761
You can use AlphaAnimation with duration = 0 to set a certain transparency on a view:
AlphaAnimation animation = new AlphaAnimation(1, 0.5);
animation.setDuration(0);
animation.setFillAfter(true);
ln2.startAnimation(animation);
Hope this helps :)
Upvotes: 2