开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜