Stuck Animation

by Michael » Wed, 10 Feb 2010 07:15:54 GMT

Sponsored Links

What I'm trying to do:

I would like to have multiple ImageViews moving across the screen in
random directions, with each one shrinking as it reaches its
destination. If an ImageView is clicked, it changes color.

How it is currently implemented:

I create a new ImageView then add it to my relative layout (the only
layout for the app). Then I (programmatically) create an AnimationSet
for my animations and pass that to the startAnimation() method of my
ImageView. I have an OnClickListener assigned to each ImageView.

What happens:

The animations work out as they should, but the ImageView also appears
in the top left corner of the screen (unmoving). The image in the top
left corner of the screen is what responds to clicks (and not the
moving image).


This is my first attempt at Android tween animations, so forgive me if
this is something really trivial. I feel that I shouldn't be adding my
ImageView to the layout before starting the animation, but I can not
get the ImageView to appear on the screen any other way. Does anyone
know what might be the problem?


Other Threads

1. Atlanta Android Users Group

This post is for any developers in the Atlanta area that are looking
for an Android users group to work with.  I would like to form a group
that can be used to help each other with application ideas, mentoring
and android tutorials on a local level for the upcoming Android
Developers Challenge II for 2009.  Send me a reply if you are
interested and we can go from there.


2. 2D Double Buffering in Android 1.5 (with Canvas?)

Not just SurfaceView, regular views also benefit from double buffering.

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


3. Regd. Android Wrapper Classes on top of SKIA Classes

4. San Francisco Android App Release Party/Meetup This Sunday:

5. Issues with Hello World

6. Create an Adapter for Gallery

7. Get all application which use android.intent.action.BOOT_COMPLETED