摘要: 有时候我们需要在EditText组件输入完直接点回车进入 回车点击事件中处理相关业务,总是换行很伤脑筋,索性网上搜了一个办法,很实用,在这里记下来。 首先获取组件id: edt_city= (EditText) findViewById(R.id.edt_city); 然后: //回车不换行 edt 阅读全文
posted @ 2017-04-05 16:46 星辰之力 阅读(2403) 评论(0) 推荐(0)
摘要: mEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event... 阅读全文
posted @ 2017-04-05 16:44 星辰之力 阅读(14061) 评论(0) 推荐(0)