That is an interesting question:  I haven't run across any way in
Android to control the shape of the sensitive area of a button.  Is it
always a rectangle, or can it be made circular, triangular, etc, by
making it conform to the shape of an image?

On Oct 11, 6:03 pm, Mark Murphy <[email protected]> wrote:
> A button is shaped like a button courtesy of its background. In the
> case of a button, that is a StateListDrawable consisting of a series
> of nine-patch (stretchable) PNG files representing different states
> (normal, pressed, focused, disabled, etc.).
>
>
>
> On Mon, Oct 11, 2010 at 7:01 PM, Dancing Fingers <[email protected]> wrote:
> > Hi guys,
> > I'm working on my own Hexagonal button which works in JAVA.  I was
> > studying Android Button.java:
>
> > @RemoteView
> > public class Button extends TextView {
> >    public Button(Context context) {
> >        this(context, null);
> >    }
>
> >    public Button(Context context, AttributeSet attrs) {
> >        this(context, attrs, com.android.internal.R.attr.buttonStyle);
> >    }
>
> >    public Button(Context context, AttributeSet attrs, int defStyle) {
> >        super(context, attrs, defStyle);
> >    }
> > }
>
> > I don't understand where it gets it shape.  If you're adding an
> > anClickListener of does button know the geometry that's within it's
> > boundries?
>
> > Any enlightenment would be appreciated.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to