Drawables are non-interactive elements, so you cannont set a click listener on a drawable.
A simple solution would be putting an ImageView
containing the "search" icon over the EditText
and adding a right padding on the EditText
so the text doesn't overlap with the icon.
<FrameLayout android:layout_width="wrap_content"
android:layout_height="wrap_content">
<EditText ...
android:paddingRight="..."
... />
<ImageView ...
android:src="@drawable/search"
android:layout_gravity="right|center_vertical"
... />
</FrameLayout>