In my app I have a EditText with a search Icon on the right side. I used the code given below.
<EditText
android:id="@+id/search"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="4dip"
android:layout_weight="1"
android:background="@drawable/textfield_search1"
android:drawableLeft="@drawable/logo"
android:drawableRight="@drawable/search_icon"
android:hint="Search Anything..."
android:padding="4dip"
android:singleLine="true" />
I want to set the onClickListener for the search icon image assigned to the right drawable
of EditText. How is it possible?
Also Create an Interface with
Still if u need any help, comment
Also set the drawableClickListener on the view in activity file.