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"?>
    xmlns:android="" ;

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, 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?


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

Sebastin Treu 


Other Threads

1. Using glColor4x

Anyone used glColor4x much?

I am passing colours into a line draw rtn in the usual format '4
bytes: alpha, red, green, blue.'

my call to to set the colour attempts to modify the RRGGBB parts into
fixed format values.

        int red = (color&0x00FF0000);
        int green = (color&0x0000FF00)<<8;
        int blue = (color&0x000000FF)<<16;

        surface.glColor4x(red, green, blue, 0);

I am getting screwy colours from this. I have searched but there
aren't many examples of this call kicking around and used in this way.
I am obviously doing something dumb. Do I have to format the rgb
values as percentages somehow?

'surface' is defined as GL10 btw.


2. How can I add a new adb command?

Because I want to develop Android debug tools in Android, I want to
via adb interface. How can I add a new adb command? Thanks for your


3. Looking for tutorials about java.util.Date class

4. Preventing a contact from being added to system group

5. How can I get current SDK version in my program code ?

6. Unable to play youtube videos on SDK 1.5 emulator, but playing well on SDK 1.0 emulator

7. Unable to play youtube videos on SDK 1.5 emulator, but playing well on SDK 1.0 emulator