家长Android的景观中消失外出 [英] Android View Disappearing When Go Outside Of Parent
问题描述
我有一个的LinearLayout和ImageView的这种的LinearLayout内。
I have a LinearLayout and ImageView inside this LinearLayout.
没有为ImageView的翻译效果。
There is a translation effect for ImageView.
// v = ImageView
ObjectAnimator animation2 = ObjectAnimator.ofFloat(v, "translationY", 200);
animation2.setDuration(3000);
animation2.setTarget(v);
animation2.start();
动画工作,但它消失时的ImageView的LinearLayout的外面去。
Animation working but it's disappearing when ImageView go outside of LinearLayout.
您可以在这里看到的问题: http://screenr.com/zoAH
You can see problem here : http://screenr.com/zoAH
我怎样才能修复它没有修改的LinearLayout的高度。
How can i fix it without modify LinearLayout's height.
推荐答案
找到的ViewGroup的ImageView的属于和应用<一href="http://developer.android.com/reference/android/view/ViewGroup.html#setClipChildren%28boolean%29">ViewGroup.setClipChildren(false). 缺省情况下,儿童的附图是限定到母体的ViewGroup的边界
Find the ViewGroup that the ImageView belongs to and apply ViewGroup.setClipChildren(false). By default, the drawing of the children is limited to the bounds of the parent ViewGroup.
这篇关于家长Android的景观中消失外出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!