By default it is a rectangle. All the views are rectangles as well. As Mark
said, they look different because of the backgrounds.

On Wed, Oct 13, 2010 at 9:02 AM, DanH <danhi...@ieee.org> wrote:

> 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 <mmur...@commonsware.com> 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 <batym...@gmail.com>
> 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
> 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
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy<http://github.com/commonsguyhttp://commonsware.com/blog%7Chttp://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 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




-- 
Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com

-- 
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

Reply via email to