try this hope this will help u ImageView img = (ImageView) findViewById(R.id.myImageId);
img.setOnClickListener(new OnClickListener() { public void onClick(View v) { // your code here } }); On Fri, Feb 17, 2012 at 6:16 PM, shihab shiha <shihabkp.andr...@gmail.com>wrote: > Hi all, > > I am facing a problem regarding with button customization. i am attaching > the image below. i want to activate the onclick on the visible part of this > image. the problem is if i click near to this image that means it takes as > rectangle. i want to activate only that image potion itself. how can i do > it without using canvas . pleas give a solution for this > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en