View setAnimation之后再setVisibility不起作用
来源:互联网 发布:oracle索引优化 工具 编辑:程序博客网 时间:2024/04/28 08:58
前提是你的Animation设置了这样一个属性:
final Animation animation;animation.setFillAfter(true);
原因:
All the animations (before android 3.0) are actually applied to a bitmap which is a snapshot of your view instead of on your original view. When you are setting the fill after to true this actually means that the bitmap will continue to be displayed on the screen instead of your view. This is the reason why the visibility won't change upon using setVisibility
and also the reason why your view will not be receiving touch events in its new (rotated) bounds.
解决方案:
1、将setFillAfter设置为false,或者不设置(默认是false)
2、在你要做动画的View外部嵌套一个View
0 0
- View setAnimation之后再setVisibility不起作用
- Android的setVisibility(View.GONE)不起作用在使用Animation之后.
- 【android bug】setVisibility不起作用
- android view的setVisibility
- android view setVisibility():
- view的setvisibility(8)
- 自定义View-----setVisibility
- View类的setVisibility()
- ImageView设置setVisibility属性不起作用解决办法
- android连续调用setVisibility(View.VISIBLE)和setVisibility(View.Gone)
- android setVisibility(View.Gone)无效
- android:visibility||view.setVisibility(View.VISIBLE)
- android - 利用View自身的setAnimation来实现动画。
- 利用View自身的setAnimation来实现动画效果(Hdpfans)
- view setAnimation 中的动画何时会被调用
- Android setVisibility(View.VISIBLE)代码已被执行控件未显示再界面上原因分析
- android view的setVisibility方法值
- 关于 View setVisibility()无效的情况
- Wolfram MathWorld
- CLUB编程挑战赛之 彩色石子
- python-递归合并字典
- 事件处理&时空推理(event processing/temporal reasoning)-jboss Drools Fusion
- VELT-0.1.3开发: 常规参数配置
- View setAnimation之后再setVisibility不起作用
- 收集的各类学习网站
- Java知识学习储备
- kali 切换中文 && SecureCRT中文乱码
- JVM学习之札记
- Q 4.4 creates a linked list of all the nodes at each depth
- JAVA鼠标事件
- 4412开发板 DVFS camera预览性能测试
- 协议(delegate)和代理模式