简体   繁体   English

获取布局的Alpha /不透明度

[英]Get Alpha/Opacity of Layout

How do I get the current Alpha/Opacity of Layout? 如何获得当前的Alpha /不透明度布局? I want the from of my AlphaAnimation to be the current alpha so it doesn't flicker between my fade in and fade out calls. 我希望AlphaAnimation的来源是当前的Alpha,这样它在淡入和淡出调用之间不会闪烁。

What kind of layout do you have? 你有什么样的布局? This could work: 这可以工作:

    LinearLayout layout = new LinearLayout(this);
    int opacity = layout.getBackground().getOpacity();

将来在Android 3.0中选择Get和Set方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM