It depends on what you mean by custom shaped. You can use any drawable shape for the image or background, and don't even have to subclass for that (rounded corners, etc).
But hit testing for is still rectangle-based, and AFAIK, is performed by the parent of a view, so it would be difficult to change. At the very least, you would need to subclass, intercept touch events, and throw away the ones that are inside the bounding rectangle but outside the shape. -- Kostya 2011/1/23 Robin Talwar <r.o.b.i.n.abhis...@gmail.com> > You would have to make another class and extend it by views > then overwrite the constructor and ondraw() method > then you can make the object of it in the java class and use it > > On Sun, Jan 23, 2011 at 2:09 PM, Faheem Khatri > <faheemkhatr...@gmail.com>wrote: > >> Is it possible to create custom shaped image button in android? If >> possible then how? >> -- >> 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<android-developers%2bunsubscr...@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<android-developers%2bunsubscr...@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