In my application i am trying to move images using animation.
When i try to animate the image (imageView2 or imageView4) to imageView1
The idea of @roflharrison is quite good, however, the codes has some problem:
Here we disable clipChildren recursively, but when we reached the root view, it's v.getParents() would be null, the method returns immediately, and its ClipChildren attribute won't be disabled.
What's more, for the following line:
if (v.getParent() instanceof View)
?? Shouldn't the parent of the view be a ViewGroup? And shouldn't we disable ViewGroup's clip attributes, not View's? So I change the code to the following, and it worked quite well:
public void disableClipOnParents(View v) {
if (v == null) {
return;
}
if (v instanceof ViewGroup) {
((ViewGroup) v).setClipChildren(false);
}
disableClipOnParents((View) v.getParent());
}