Question about from the ApiDemos sample project

by DS » Fri, 27 Jun 2008 03:41:52 GMT

Sponsored Links

Hoping that someone can provide some insights into how android
animations work.

In the onCreate() method of file, we have the
following AnimationSet being created

        AnimationSet set = new AnimationSet(true);

        Animation animation = new AlphaAnimation(0.0f, 1.0f);

        animation = new TranslateAnimation(
0.0f,Animation.RELATIVE_TO_SELF, 0.0f,
-1.0f,Animation.RELATIVE_TO_SELF, 0.0f

First I dont understand why there needs to be a translate animation in
addition to an AlphaAnimation. Anyway, if I comment out the last line
from the above code snippet. i.e., the AnimationSet now only has an
AlphaAnimation in it, the something very strange happens. The ListView
renders without any text being shown....until we hit a down-arrow key.
An then the list text shows up animating itself as expected.

So, for you experts out there, what the heck is going on?

- Why does one need these two animations added to the set
- Why does the ListView rendering stall the way it does
- Why does hitting a key-stroke get it unstuck
- Why is the ApiDemos code not commented at all? (this one is an extra
credit question)

Thanks in advance,



Question about from the ApiDemos sample project

by Romain Guy » Fri, 27 Jun 2008 04:25:10 GMT


You don't need the two animations. The effect I wrote in this sample
just happen to do a translate + alpha because it looks better.

It doesn't for me. Might be a bug in M5 we fixed since then.

Probably because it forced a layout + invalidate that refreshed the drawing.

Too many things to do :)

Romain Guy


Sponsored Links

Question about from the ApiDemos sample project

by Romain Guy » Sat, 28 Jun 2008 01:40:01 GMT


We are aware of this. However what needs to be done at this time is to
make the software works. Before the SDK 1.0 ships, we will spend time
cleaning it up and adding documentation. Unfortunately, this is not
our priority today (but it will be :). In the meantime feel free to
ask questions, we'll be happy to assist as much as we can.

Romain Guy


Other Threads

1. How to add another status bar

hi,i want add a bar similar to the status bar that contain several
on the bottom of the screen.anyone can help me,thanks!


2. sdcard - remaining space


sorry if this has already been answered (hard to search for this
is there any way to detect remaining space on the sdcard through the
API? I prefer not to make native or shell calls.


3. Build Environment

4. Setting up UDP connections between devices

5. Updated to 1.5 and is not regeneratated

6. Issue: Neither user 10039 nor current process has android.permission.WAKE_LOCK || Rooted Phone || App from SD card || JF image

7. Invoking one apk from another