EditText中hint消失
来源:互联网 发布:医疗美容网络 编辑:程序博客网 时间:2024/05/16 09:40
mInfo = (EditText) findViewById(R.id.fabu_info);
mInfo.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
EditText _v=(EditText)v;
if (!hasFocus) {// 失去焦点
_v.setHint(_v.getTag().toString());
} else {
String hint=_v.getHint().toString();
_v.setTag(hint);
_v.setHint("");
}
}
mInfo.setOnFocusChangeListener(new OnFocusChangeListener() {
public void onFocusChange(View v, boolean hasFocus) {
EditText _v=(EditText)v;
if (!hasFocus) {// 失去焦点
_v.setHint(_v.getTag().toString());
} else {
String hint=_v.getHint().toString();
_v.setTag(hint);
_v.setHint("");
}
}
});
singline=true 一行
inputType = 设置输入方式
- EditText中hint消失
- Android EditText聚焦时hint消失的简单代码
- Android EditText聚焦时hint消失的简单代码
- Android EditText聚焦时hint消失的简单代码
- Android EditText聚焦时hint消失的简单代码
- EditText 获得焦点时hint消失,失去焦点时hint显示
- 修改EditText中hint的字体大小
- 设置EditText中Hint字体中的大小
- EditText中Hint文本样式设置
- EditText中hint找不到字符串的资源
- EditText代码中设置hint文本大小
- android hint 自动消失
- android hint 自动消失
- android hint 自动消失
- android hint 自动消失
- android hint 自动消失 .
- Andorid中EditText中hint属性的字体颜色修改
- 自定义Android中EditText中的Hint文本的大小
- 在不root手机的情况下读取Data目录下的文件
- libevent和libev
- Development:Kickstart CD
- Evacuation HDOJ 3757 poj 3963
- 通过/dev/mem进行恶意代码注入
- EditText中hint消失
- libev源码分析libev数据结构整理
- 向量叉积
- sqlite3常用命令与语法
- HTML003——表单Form
- 数据库锁表现形式1
- MFC原创教程:4.0 Prop:属性表单
- 制作自己的无人值守RHEL安装光盘
- shell中的命令替换