tags:

views:

12

answers:

0

Hey,

I'm creating a game for Android and i want to add click event on some game objects/images in my game. The problem is that the object/images is created programatically in a Thread, so i don't know how to add a click event to them. My code structur looks like this:

-> Main.xml

-> Main.class

--> MainView.class

---> MainThread.class

And the objects is created in the MainThread class. How would i add click event to them?

Im create the object like this, in MainThread class:

protected Bitmap image;
image = BitmapFactory.decodeResource(resources, resources.getIdentifier(filename, "drawable", "com.example.android.jetboy"));