CheckBox cbx_pwd_visi;//CheckBoxEditText edt_pwd;//Password input//CheckBox事件监听cbx_pwd_visi.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {    @Override    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {        if (isChecked) {            edt_pwd.setTransformationMethod(HideReturnsTransformationMethod.getInstance());//选中CheckBox,显示密码        } else {            edt_pwd.setTransformationMethod(PasswordTransformationMethod.getInstance());//隐藏密码        }    }});


更多相关文章

  1. Android应用前后台监听最简单的方法
  2. android 隐藏输入法
  3. EditText去掉边框和隐藏光标
  4. Android(安卓)CoordinatorLayout的使用——实现Toolbar的隐藏和
  5. android 滑动欢迎界面
  6. android 入门 Gallery
  7. 38 Android(安卓)actionbar 简单使用
  8. android 监听软键盘 回车键
  9. Android(安卓)BottomNavigationView的使用

随机推荐

  1. Android、Java单例看这里(常用的单例模式
  2. android 手机获取当前连接的wifi配置信息
  3. Android接口初了解
  4. Android 签名出错
  5. android判断网络连接状态
  6. android cmd aapt
  7. [Android] 更改关联的源码路径
  8. Android手机开发:开机自动启动程序
  9. 如何在Android中在fragment中实现点击按
  10. Android EventBus 传递消息