对于EditText可以定义android:imeOptions在输入法的右下角进行监听操作,layout中定义如下

 <EditText            android:id="@+id/edit"            android:layout_width="wrap_content"            android:layout_height="wrap_content"            android:imeOptions="actionDone"            android:singleLine="true"            android:inputType="text"  />

在java中监听如下:

@Overridepublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {if (actionId == EditorInfo.IME_ACTION_DONE) {             dowhat()...}return true;}return false;}

  

更多相关文章

  1. Android开发问题记录-ARouter init logistics center exception
  2. 自定义android RadioPreference组件
  3. android 预定义样式简述
  4. Android编译过程详解(三)
  5. How to add a new keycode in android
  6. Android:解决RadioGroup中RadioButton的图片自定义及每项间隔距离
  7. Android自定义radiobutton(文字靠左,选框靠右)
  8. Android中对NFC的实现代码分布在如下几个地方:
  9. android自定义view属性

随机推荐

  1. Android中TextView如何实现水平和垂直滚
  2. android系统自带的主题与样式(theme and
  3. Android(安卓)xml资源文件中@、@android:
  4. Android中对NFC的实现代码分布在如下几个
  5. android 使控件透明
  6. Android(安卓)存储选项之 ContentProvide
  7. android定位布局
  8. Android(安卓)Camera 使用小结
  9. android layout_weight了解
  10. android自定义view属性