Animation doubt

by Sebastič°Šn Treu » Sat, 17 Jul 2010 09:45:00 GMT


Sponsored Links
 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.

Sebastin Treu
 http://labombiya.com.ar 

--



Other Threads

1. how to enable sound in android emulator

hi all

can any one help me with how to enable sound in android emulator .i am using
fedora 13 .

Thanks

vijay

-- 

2. Any Droid owners received Froyo yet?

I heard rumors that Froyo would be released this week for Verizon
Droid users. Has anyone actually seen it come through?

-- 

3. Remember my "whines" about lack of Android Game Framework ?

4. Getting ParserConfigurationException when trying to insert a new Calendar.

5. Sharing a SQLite database between apps with shareduserid

6. Emulator networking

7. Problem reading datebase via content provider