 <p>You don't have access to the right image as far my knowledge, unless you override the <code>onTouch</code> event. I suggest to use a <code>RelativeLayout</code>, with one <code>editText</code> and one <code>imageView</code>, and set <code>OnClickListener</code> over the image view as below:</p> <pre><code>&lt;RelativeLayout android:id="@+id/rlSearch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@android:drawable/edit_text" android:padding="5dip" &gt; &lt;EditText android:id="@+id/txtSearch" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_toLeftOf="@+id/imgSearch" android:background="#00000000" android:ems="10"/&gt; &lt;ImageView android:id="@+id/imgSearch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:layout_centerVertical="true" android:src="@drawable/btnsearch" /&gt; &lt;/RelativeLayout&gt; </code></pre>