Get Alpha/Opacity of Layout
How do I get the current Alpha/Opacity of Layout? I want the from of my AlphaAnimation to开发者_如何学Go be the current alpha so it doesn't flicker between my fade in and fade out calls.
What kind of layout do you have? This could work:
LinearLayout layout = new LinearLayout(this);
int opacity = layout.getBackground().getOpacity();
Going to opt for the Get and Set methods in Android 3.0 in future.
精彩评论