往EditText中添加图标的简单方法
2015-10-25 22:44
309 查看
在EditText中配置 android:drawableLeft="@drawable/tabbar_discover"属性将图片发在EditText的最左端其中属性值是你要添加的图片的名称
在Editext中配置android:drawableRightt="@drawable/tabbar_discover"属性将图片放在EditText的最右端
我的代码
<EditText
android:id="@+id/Search"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@color/white"
android:hint="@string/operator"
android:drawableLeft="@drawable/tabbar_discover" />
在Editext中配置android:drawableRightt="@drawable/tabbar_discover"属性将图片放在EditText的最右端
我的代码
<EditText
android:id="@+id/Search"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="5dp"
android:layout_marginTop="5dp"
android:layout_marginRight="5dp"
android:background="@color/white"
android:hint="@string/operator"
android:drawableLeft="@drawable/tabbar_discover" />
相关文章推荐
- XMPP客户端库Smack 4.1.4版官方开发文档之二
- 九度OJ 1161:Repeater(复制器) (递归)
- QGraphicsView中选中QGraphicsPathItem使之不出现虚线框
- Permutation
- 九度OJ 1161:Repeater(复制器) (递归)
- 微信开发之带参二维码的使用
- Swift语言:distance、advance函数更改
- 排序算法三:二分插入排序
- PyQt主窗体设置停靠窗口(QDockWidget)的叠加顺序
- xcode 下载地址 (复制粘贴到迅雷里面就可以了,最好买个几小时的迅雷会员这样快些)
- c语言学习收获
- Ubuntu下Java环境配置
- 关于树莓派提示符的名称和samba共享名称问题
- How to create a bootable USB stick on Ubuntu
- 输入框的展示
- rpc的简单介绍
- 通用线程池的设计和实现[C语言]
- Python基础(九) json
- String的一些总结(JAVA)
- poj_3168 平面扫描