Tuesday, October 5, 2010

[android-developers] Re: Padding of a Button

ImageButton sorta works except that the background is gratuitously
supplied. Is there a standard resource I can use that's a transparent
background?

On Oct 5, 4:46 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Tue, Oct 5, 2010 at 5:40 PM, DanH <danhi...@ieee.org> wrote:
> > Kind of a newbie question, I suppose:
>
> > I've got a horizontal layout with Button, SeekBar, Button.  I'd like
> > the actual space (and active area) of the button to be somewhat wider
> > than the image (a round dot) used for the button.
>
> > So I tried setting paddingLeft and paddingRight on the button.
>
> > But what I got was the round dot stretched into an oval.
>
> > How would I increase the width of the button without stretching the
> > image?
>
> If the Button is really an ImageButton, find an android:scaleType
> value that fits your needs (center or centerInside, I would guess, but
> I haven't fussed with these values).
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training in London:http://skillsmatter.com/go/os-mobile-server

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate