-3

I want to create a button or image button and It will contain icon and text. The icon will locate to left side and text will located center a button.

Ibrahim BOLAT
  • 223
  • 1
  • 6
  • 18

2 Answers2

1
<Button
            android:id="@+id/button3"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:drawableLeft="@android:drawable/btn_star_big_on"
            android:text="Drawable\nleft"/>

Here the answer :)

Ibrahim BOLAT
  • 223
  • 1
  • 6
  • 18
0

There are several examples if you search further. For instance:

Button with text AND an image (Android)

Android: combining text & image on a Button or ImageButton

Community
  • 1
  • 1
amahfouz
  • 2,328
  • 2
  • 16
  • 21