tags:

views:

15

answers:

1

Friend's, I have an single image in which it set has screen home page in which it contains 5 menu icons,so i need to know how to set click events for this icons,is't possible set click event for individual icons. (how to set click events for image have 5 menus has a single image)

+1  A: 

I'm unsure what you mean, how are you drawing this image? is it on a canvas or something else? is it a bitmap? if you want individual click events for 1 object and from what I can decipher from your question you have 1 image which contains 5 icons, could you not draw it all on a canvas then set the 5 icons as their own image drawn on top of the background image and then setup individual onClick() events for each?

Then if you're setting them to click in a new Activity just use startActivity()

e.g

        Intent myIntent = new Intent(theclass.this, whereyouwanttogo.class);
        menu.this.startActivity(myIntent);

Also, if this is a menu is there any reason why you're not just using a menu rather than an image?

http://developer.android.com/guide/topics/ui/menus.html

Aidanc
thanks for your response
MGSenthil