WEB开发网
开发学院手机开发Android 开发 Android监听键盘上的确定键 阅读

Android监听键盘上的确定键

 2012-09-12 16:37:50 来源:WEB开发网   
核心提示:mETCommentContent.setOnEditorActionListener(new OnEditorActionListener() {@Overridepublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {if (
mETCommentContent.setOnEditorActionListener(new OnEditorActionListener() {
			
			@Override
			public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
				if (actionId == EditorInfo.IME_ACTION_DONE) {
					hideSoftInput();
				}
				return false;
			}
		});

Tags:Android 监听 键盘

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接