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eY/Yyjb3/XEVuvL68sxr1WZw4mo9cA8Nqknr8edgmeMD9y12iyiHgLF48O7HWq8bnRawBvpUn9fGPr2aj3HrH0ulyh1wAwguX9Q/ojqZTKXF7H7x8y4vJaW3t94c5Zeg0AI+3+/flyvaWqpddz144kvT59MB69BoCM3bz/9bCH/Pr/SNJro8ki4h29/Am9BoBcdvr5MrluQl7/FUN7fWrpmNHrA/HoNQAMMP7nN/p1f8QzfOmvb/Q6abKIeOfulifY64mg1wAcl/Pz0f26H2wF41XU0uvyykl6DQDjUkoF7cB8S9VUqTfHL3WXpdfHr36W9PrEgXj0GgDyUNsqDMPuJx0GW0H0Ksr1/4rDmL02miwi3olrh+k1ALjC0uv55RP0GgBcYel16vkQeg0AxbL0eu7GUXoNAK6w3l9/mvT6yIF49BoACmD22mhy93x92LVeA8D+Zen1mTtzRq9L8eg1ABQg1eukySLiLd47XaLXAOAIS68Xbp+k1wDgCkuv528eT3r9cSkevQaAApi9NposIt7Z26fpNQC4wtLr8spJeg0ArrD0+sytU/QaAFxh6fXinXl6DQCu2O35mmQDwB7o5L+/rkybv80YY8yJVaZFxFu4ORf3Wldn1UclxhhjTk1XZ7P3IVprVZku/DtjjDGWrDKtte593q7Za621rs5SbcYYK36VaV2d7YY5e39d0AU7AGCE7M83Fv39AAAGExHviweL9BoAHCci3vn7Z+k1ADhORP4DAOGlVPq1wwUAAAAASUVORK5CYII=" alt="" />
2. 实现代码
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" > <EditText
android:id="@+id/txtSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="请输入"/> </LinearLayout>
MainActivity.java
import android.app.Activity;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.text.Editable;
import android.text.InputType;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.Menu;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.widget.EditText;
import android.widget.Toast; public class MainActivity extends Activity { private Drawable mIconSearchDefault; // 搜索文本框默认图标
private Drawable mIconSearchClear; // 搜索文本框清除文本内容图标
private EditText mSearchView = null; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main); // 得到资源里面的图标文件
final Resources res = getResources();
// 默认的图标
mIconSearchDefault = res.getDrawable(R.drawable.txt_search_default);
// 清除图标
mIconSearchClear = res.getDrawable(R.drawable.txt_search_clear); mSearchView = (EditText) findViewById(R.id.txtSearch);
mSearchView.addTextChangedListener(tbxSearch_TextChanged);
mSearchView.setOnTouchListener(txtSearch_OnTouch); } @Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
} /**
* 判断输入框中是否有数据,然后显示相应的图标文件
*/
private TextWatcher tbxSearch_TextChanged = new TextWatcher() { // 缓存上一次文本框内是否为空
private boolean isnull = true; @Override
public void afterTextChanged(Editable s) {
if (TextUtils.isEmpty(s)) {
if (!isnull) {
mSearchView.setCompoundDrawablesWithIntrinsicBounds(null,
null, mIconSearchDefault, null);
isnull = true;
}
} else {
if (isnull) {
mSearchView.setCompoundDrawablesWithIntrinsicBounds(null,
null, mIconSearchClear, null);
isnull = false;
}
}
} @Override
public void beforeTextChanged(CharSequence s, int start, int count,
int after) {
} /**
* 随着文本框内容改变动态改变列表内容
*/
@Override
public void onTextChanged(CharSequence s, int start, int before,
int count) { }
}; // 当清除图标被点击的时候的处理事件
private OnTouchListener txtSearch_OnTouch = new OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_UP:
int curX = (int) event.getX();
if (curX > v.getWidth() - 38
&& !TextUtils.isEmpty(mSearchView.getText())) {
mSearchView.setText("");
int cacheInputType = mSearchView.getInputType();// backup
// the input
// type
mSearchView.setInputType(InputType.TYPE_NULL);// disable
// soft
// input
mSearchView.onTouchEvent(event);// call native handler
mSearchView.setInputType(cacheInputType);// restore input
Toast toast = Toast.makeText(MainActivity.this, "你好啊", Toast.LENGTH_SHORT);
toast.show(); // type
return true;// consume touch even }
break;
}
return false;
}
}; }
3. 使用的图片
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAbCAMAAABY1h8eAAAAM1BMVEW/v7+/v7+/v7+/v7////+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7+r8GajAAAAEXRSTlMAMGCAACCP3/8Qz79An++vUBjdUD8AAADgSURBVCjPfZLhAsMQDITboI5ie/+nXY62bKvmFz7JnciyXLGKMUZW2+MkbvNo4Tf3Aw3GMCMMUU92cawgu65juCBZTEcNa1M8Kfe6yWG5oA1Z6QFVL3fPtV5uuqrCInyJa/p8C4Uc4QZQT1BWXikQpQnYCD12HqpHpcoA5u7wCvVUWI09KEJW2AThHS2HKlZzUPNpSZ2IpdejtWVg1tJvh6wBVDv/8C7zUfNw60p3G5rb9PBOPHXo9dXb9jGuSsZqe/or8eE/q+fJJLRe3M9QSdPpKyZM5/ZEHZ4T/x4n/gPXSQ3LnpwLngAAAABJRU5ErkJggg==" alt="" /> aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAABgFBMVEX////3/P+z6f+T4f941v+L3v+r5P/s+f/x+v8guv8Ytf8Ysv8dtf9hzv/X8v/K7P8tu/8twv8wxv8xzv8vyf8esP+e3/8hsv8t1P8dxP8ttv8otP8brP+W2v8usv86y/+F3/+l5/9Q0P8kw//G7f92zP8bpP78/v8gqf9Dtv8lpf4euP++5f8doPpOw/8fn/cxrv9+zf+O0/8cm/QdmPFau/8imvTF5f8ppP1JtP+G1P8gl+4yqv+43/zm9P8hmfMooPdWvf80qf9+xfmy3f4kmvIgk+ktnvbr9v9Eqfgsofs1pv6z4/9Pqe84qv8kl/JYsvj1+/95w/0ypv80tP/J5fwqmO84p/9Zs/wqqv+h2v8umvMrmfQ5pf45ovo3oPc5pf0umvQllO8mmPUznvc+sf9qwv8vl/A6pPw5oPY5nfI+rf8/uv88qf83ofo8tf8tpv8xk+ctlOw2rv+X0f8mid46mu47pP8uo/+d0/+Dxv9Ytf9wwP8tnv8+pf8xof/rr60gAAAAgHRSTlMA/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1AKuiAAAAFRSURBVCjPY2CAA0YmZhZWNnYGNMDBwsnFzcPNzcXLhyLOL8AtKCgkLCIoIMojhiwuKi4gJCEpKSkhLCUtIwsXZ5cTlRKUlFdQZFaSVAbKqMAkVNWkpJVZ1UFMJiFxOQ1Ndah7tKTkRJmhilS05eTU+CFsHV05LT11mHYWfQNdQwjTyNjABOEUPhMDLVMI09DMwMQc4SMTAwtLCNPK2sbEFi5hZ2/j4Ahhstk7mTnDJVzsnVxVoWrcnJzcPWBB5unlreUD5fi6+/kHBELYQf7ewSEcEHZoWHh4uL+nrQdDoHmEf7hfZBRUPDomNi4+ITEpOSXZPyYuNTIN4qfQ9OiMzKzsHM3cjLyM3NT8gjSIoXaFRXFZWeEF2QU2+fn5xQV+UHMYSkrLysrKKyrVdaqqq6trXDhgzq6sravLrahkwAAesfXe9VjEgZZUVZkzUAEAAFLaP89l9e6lAAAAAElFTkSuQmCC" alt="" />
4.说明
在农民伯伯的博客中看到,因为找不到网址 ,特此说明一下
Android -- 编辑框更改样式的更多相关文章
- Android 编辑框(EditText)属性学习
EditText的属性很多,这里介绍几个:android:hint="请输入数字!"//设置显示在空间上的提示信息android:numeric="integer&quo ...
- Android 编辑框插入表情图片
首先,把整理好的表情图片以及布局用到的一些图片导入到项目的res/drawable目录中. 然后,编辑res/layout目录下布局.xml文件,这里我把oschina客户端的布局代码贴上来,供大家参 ...
- [Python] wxPython 编辑框组件学习总结 (原创)
1.总结 1.常用4种 编辑框 的构造 1.普通编辑框 单行输入的简单编辑框 (?为所在框的对象,同下) self.textBox = wx.TextCtrl(parent = ?) 2.密码编辑框 ...
- 2.Android之按钮Button和编辑框EditText学习
今天学习android一些基本控件:button和edittext使用,我们平时网页或者手机登录一般都会有登录框,这里面就用到这两个部件. 如图: 所对应XML文件: 一般第二个编辑框都是输入密码,所 ...
- 自定义编辑框VC,可加载更改字体,添加背景图片,显示输入提示信息
搞了一天终于弄了个完整的编辑框控件出来了, 哎,,,搞界面开发还是有点复杂的. #pragma once #include "AdvEdit.h" // CBkgEditBox c ...
- 更改MyEclipse编辑框的背景颜色
更改MyEclipse编辑框的背景颜色 1.未改动之前.编辑框背景色 2.依次操作,"Window--->Preferences" 3.选择"General---& ...
- Android EditText弹出软键盘实现页面标题头不动,软键盘弹出在编辑框下面
为了实现EditText编辑的时候弹出软键盘标题头不动,底部编辑框,上移在这总结: RelativeLayout在弹出软键盘的时候先寻找android:layout_alignParentBottom ...
- Android搜索框效果
转载:http://blog.csdn.net/walker02/article/details/7917392 需求:项目中的有关搜索的地方,加上清空文字的功能,目的是为了增加用户体验,使用户删除文 ...
- java报表工具FineReport的公式编辑框的语法简介
FINEREPORT用到公式的地方非常多,单元格(以=开头的便被解析为公式),条件显示,数据字典,报表填报属性值定义,图表标题,轴定义,页眉页脚,甚至单元格的其他属性中的鼠标悬浮提示内容都可以写公式, ...
随机推荐
- ExcelReport第三篇:扩展元素格式化器
导航 目 录:基于NPOI的报表引擎——ExcelReport 上一篇:ExcelReport源码解析 概述 上篇中已介绍了ExcelRepor的架构,本篇将通过例子讲述如何扩展元素格式化器以满足 ...
- [LeetCode] Word Pattern
Word Pattern Total Accepted: 4627 Total Submissions: 17361 Difficulty: Easy Given a pattern and a st ...
- Java Hour 64 JVM 最大内存设置
从这篇博文起,不再是流水式的学习记录了,稍微改进下风格. 运行时获得当前JVM 设置大小 首先,-Xmx100000000指定最大的内存分配. public static void main(Stri ...
- SVN-简要说明
SVN官方推荐在一个版本库的根目录下先建立trunk.branches.tags这三个文件夹,其中trunk是开发主干,存放日常开发的内容:branches存放各分支的内容,比如为不同客户定制的不同版 ...
- php+jquery+ajax实现用户名验证
大多数情况下,jquery代码的编写,都要求我们将jquery的代码放在以下三种中任一个function里. 有三种写法,同样效果,有点像Window.onload,但也有不同,就是window.on ...
- C 和 C++ 混合代码 cmath编译出错
最近在网上下载了 Triangle 库,准备在程序中调用来三角化生成网格,但出现了很多错误,如下: 1> triangle.c1>d:\program files\visualstudi ...
- 利用Aspose.Word控件和Aspose.Cell控件,实现Word文档和Excel文档的模板化导出
我们知道,一般都导出的Word文档或者Excel文档,基本上分为两类,一类是动态生成全部文档的内容方式,一种是基于固定模板化的内容输出,后者在很多场合用的比较多,这也是企业报表规范化的一个体现. 我的 ...
- UIPopoverController 的使用
#import "ViewController.h" #import "RYColorSelectController.h" #import "RYM ...
- UVA 12232 Exclusive-OR(并查集+思想)
题意:给你n个数,接着三种操作: I p v :告诉你 Xp = v I p q v :告诉你 Xp ^ Xq = v Q k p1 p2 … pk:问你k个数连续异或的结果 注意前两类操作可能会出现 ...
- POJ 1182 食物链 (经典带权并查集)
第三次复习了,最经典的并查集 题意:动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形.A吃B, B吃C,C吃A. 现有N个动物,以1-N编号.每个动物都是A,B,C中的一种,但是我们 ...