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. OOT WTA: Anggota Republik Mimpi G1

Maap pinjem jalur mods,
Iseng tengah malem aja,sambil nyangkul di ladang
As subject,adakah selain orang2 ini yg jadi masters of G1 dan berkutat dgn
HTC Dream G1.
Buat nambah2 silaturahmi juga.Mohon maap jika tak berkenan.
Suhu/i :
1.Jefri Priambodo
4.Enya Anggia
6.Jei W

Waks ..lupa ketinggalan Adityo(Tyo)

Salam kenal nyubeeh :)



"Indonesian Android Community [id-android]" 

2. Why my logger can`nt record mos t log info锛


The below is my logger define:

 private final static String SERV_LOG_PATH =
 private final static String ERR_LOG_PATH = "/data/data/com.mid/error.log";
static {
        try {

            // init to error logger
            servLogger = Logger.getLogger("service");
            FileHandler servHandler = new FileHandler(SERV_LOG_PATH, 1024,
5, true);
            servHandler.setFormatter(new SimpleFormatter());
            errLogger = Logger.getLogger("error");
            FileHandler errorHandler = new
            errorHandler.setFormatter(new SimpleFormatter());

        } catch (IOException e) {
            Log.e("TAG", e.toString());
I user the to record my log info ,but the log file can`nt
record the most log,so what happen ?
Anyboy can help me!


Boern Z


3. Sprint Hero Android 2.1 Lost Copy Protected Apps Access

4. How to export mediaplayer on 2.2?

5. Buku Android Programming

6. Multi touch di Spic

7. Multicast through virtual router of the emulator