I set the drawable using xml android:drawableBottom so
setCompoundDrawablesWithIntrinsicBounds should be used. I've it now
also tried setting it programmatically, same result. I'am going back
to using nested LinearLayout's for label and button, this is to much
of a hassle.


On Jan 9, 4:04 am, Romain Guy <romain...@android.com> wrote:
> You should use setCompoundDrawablesWithIntrinsicBounds()
>
> On Sat, Jan 8, 2011 at 6:40 PM, Henrik Lindqvist <henrik.lindqv...@gmail.com
>
>
>
> > wrote:
> > I'am trying to use TextView's setCompoundDrawables feature because i
> > wan't a button with a label above it. I set android:drawableBottom to
> > my button drawable, which is a <layer-list> with a button background,
> > an icon and a toggle indicator.
>
> > First app launch every thing looks nice, close app, launch again and
> > the drawables seems to have lost their padding. If I close the app and
> > wait a few more seconds, GC runs or something, then the buttons looks
> > ok again.
>
> > Does the drawables gets altered at first launch? Doesn't the TextView
> > set the bounds on the drawables the second launch? Very inconsistent.
>
> > --
> > 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
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them

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