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. problems with listview

hi all,

i have problem with listview

i want to get white background i am getting gray color in the list

and also scrollbar is not working in the listview

can please anyone help me out this



2. Blank screen when running NativeActivity sample

I'm trying to run the NativeActivity sample that's part of the ndk
distribution (r5). I can run the app, but all I see on the emulator is
a blank screen. How can I diagnose the problem?


3. to implement a gallery getting resource from a webservice

4. WebView not responding to KEYCODE_DPAD_CENTER the same way as a Touch

5. Important: XmlPullParserException while accessing SOAP webservice in Android

6. Remote access to phones

7. Memory Leaks in application