How to restrict bounds for Translate Animation for a view in Android?

Posted by Kiran Parmar on Stack Overflow See other posts from Stack Overflow or by Kiran Parmar
Published on 2011-03-04T07:11:49Z Indexed on 2011/03/04 7:25 UTC
Read the original article Hit count: 224

Filed under:
|

Hello All.
Let me explain the scenario that I want to achieve:-

Consider the below as the Layout I have inside a Parent_Linearlayout:

[Linear Layout] (Fill_Parent, Wrap_Content)
[ScrollView]
Activity's setContentView is set to the Parent_Linearlayout
In the application, when a condition is met, I want the Scrollview to be removed from the screen and instead put another View in its place.<br>
I've been able to do this, When I remove the ScrollView, I'm applying translate Animation to it so that it seems as if the View has gone to the top, before removing it.

But when the animation occurs, the ScrollView translates OVER the Linear layout present above it. How do I restrict it, so that the scrollview does not go over the linear layout, but disappears at the base of the Linearlayout. I want the linearlayout to always stay visible..

I've been trying to do this from quite some time, but I've not been able to get desired results.. Could someone kindly help me out here??

© Stack Overflow or respective owner

Related posts about android

Related posts about animation