Centering ToggleButton Image - With No Text
Posted
by
KickingLettuce
on Stack Overflow
See other posts from Stack Overflow
or by KickingLettuce
Published on 2013-05-14T19:38:03Z
Indexed on
2013/11/08
15:55 UTC
Read the original article
Hit count: 162
Here is my ToggleButton
:
<ToggleButton
android:id="@+id/bSmenuTopItems"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:background="@drawable/master_button_selector"
android:drawableLeft="@drawable/flame_icon" />
I have no text in this image, I need a ToggleButton
due to Active State.
EDIT: I think question was misunderstood. There is a drawable inside the Toggle Button (flame_icon
) and it is set as background
. I want it to be centered. There is no Text, just an image. I need a Toggle Button because I need to have an Active State when selected.
There is only drawableLeft
, drawableRight
, drawableTop
, etc. I want a draweableMiddle
that doesn't seem to exisit.
© Stack Overflow or respective owner