在我的应用程序中,我EditText在右侧有一个搜索图标.我使用下面给出的代码.
<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" />
Run Code Online (Sandbox Code Playgroud)
我想设置onClickListener分配给右侧drawable的搜索图标图像EditText.这怎么可能?