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. 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
2.Ichan
3.Dantez
4.Enya Anggia
5.Justinus
6.Jei W
7.........
8.........
9.........

Waks ..lupa ketinggalan Adityo(Tyo)

Salam kenal nyubeeh :)

Trimsss

@nukudroid
thenukudroid.wordpress.com

-- 
"Indonesian Android Community [id-android]" 

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

Hi,all:

The below is my logger define:

 private final static String SERV_LOG_PATH =
"/data/data/com.mid/serv%u.log";
 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());
            servLogger.addHandler(servHandler);
            errLogger = Logger.getLogger("error");
            FileHandler errorHandler = new
FileHandler(ERR_LOG_PATH,1024,1,true);
            errorHandler.setFormatter(new SimpleFormatter());
            errLogger.addHandler(errorHandler);

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

THX!!

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