Android Button with both text and an Image

So ImageButton lets you create a button with an Image. And Button has text… How to combine them?

On a regular Button you can add an image on top, left, right or bottom like this:


<Button
android:id="@+id/btnId"
android:text="Some text here"
android:drawableTop="@drawable/icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>

Leave a Reply

Your email address will not be published. Required fields are marked *

Please reload

Please Wait