---
title: "How to add image in button with text in android"  
description: "How to add image in button with text in android"  
author: "Anonymous User"  
published: 2015-02-27  
updated: 2015-02-27  
canonical: https://www.mindstick.com/forum/12986/how-to-add-image-in-button-with-text-in-android  
category: "android"  
tags: ["android", "android controls"]  
reading_time: 1 minute  

---

# How to add image in button with text in android

I want to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) [image](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) in [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) with [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is

```
<Button        android:id="@+id/mybtn"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:text="Ok" />
```

\

## Replies

### Reply by Anonymous User

You need to add drawableLeft or drawableRight in your xml file. It set icon on left, right top and bottom.

```
<Button      
android:id="@+id/mybtn"       
android:layout_width="wrap_content"       
android:drawableLeft="@drawable/ic_launcher"      
android:layout_height="wrap_content"android:text="Ok"/>
```

It will look like :

\

![How to add image in button with text in android](https://www.mindstick.com/mindstickforums/43e8e84f-8d0b-4a8b-8bcb-2d734986f583/images/306ca9bb-beab-4117-b9ae-91787ced58df.png)\


---

Original Source: https://www.mindstick.com/forum/12986/how-to-add-image-in-button-with-text-in-android

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
