Hi all,

I want to slide down a RelativeLayout filled with information. I have
written this animation:

<?xml version="1.0" encoding="utf-8"?>
<translate
    xmlns:android="http://schemas.android.com/apk/res/android";
    android:fromYDelta="0"
    android:toYDelta="87%"
    android:duration="350"
    android:fillAfter="true"
    />

The animation parameters are ok. But, when fillAfter is true, the
RelativeLayout measures are wrong. In fact, the getTop() is still the
same as before. And, if I set a listener to call
layout(int,int,int.int) onAnimationEnd(), the layout dissapears until
I click it. I call layout() this way in onAnimationEnd() method:

 if (animations[MOVE_DOWN] == animation) {
    textBox.layout(left, top, right, bottom);
    textBox.postInvalidate(left, top, right, bottom);  //just for
testing if this redraws the layout


And, if I set the fillAfter to false, and onAnimationEnd() I call the
layout() method without the invalidate method, when the view gets
updated (it's connected to a onItemClickListener from a Gallery) with
information, it will be redraw "expanded".

Anyone can give me a tip how to create such effects? I set a
background layout as those folders tabs. I want to slide it down and
up, upon user touch events. I managed to do that. The animation is
like I want, but data it's not consistent. How to make the layout data
consistent with the animation data? I tried out with the listener
calling the layout() method, but the RelativeLayout dissapears.

Any help?

Regards,

PS: I can make a video to show how the animation is missbehaving.
-- 
If you want freedom, compile the source.

Sebastián Treu
http://labombiya.com.ar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to