4条回答
- Chengzi_963 2012-10-31 09:13关注
不实现点击:
android:drawableRight="@drawable/icon"
实现点击的代码:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" > <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:hint="Enter search key" /> <ImageButton android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:src="@drawable/search" android:layout_centerVertical="true" android:layout_margin="5dp" android:text="Button"/> </RelativeLayout>
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报