深圳全飞鸿

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 582|回复: 0
打印 上一主题 下一主题

安卓输入框:Android.EditText

[复制链接]

800

主题

1379

帖子

7725

积分

版主

Rank: 7Rank: 7Rank: 7

积分
7725
跳转到指定楼层
楼主
发表于 2019-5-22 19:49:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
安卓输入框:Android.EditText

  1.         mPasswordView = (EditText) findViewById(R.id.password);
  2.         mPasswordView.setOnEditorActionListener(new TextView.OnEditorActionListener() {
  3.             @Override
  4.             public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) {
  5.                 if (id == EditorInfo.IME_ACTION_DONE || id == EditorInfo.IME_NULL) {
  6.                     attemptLogin();
  7.                     return true;
  8.                 }
  9.                 return false;
  10.             }
  11.         });
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|nagomes  

GMT+8, 2025-6-29 07:18 , Processed in 0.071416 second(s), 21 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表