Android(安卓)EditText 的 android:imeOptions 属性
16lz
2021-12-04
对于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;}
更多相关文章
- Android开发问题记录-ARouter init logistics center exception
- 自定义android RadioPreference组件
- android 预定义样式简述
- Android编译过程详解(三)
- How to add a new keycode in android
- Android:解决RadioGroup中RadioButton的图片自定义及每项间隔距离
- Android自定义radiobutton(文字靠左,选框靠右)
- Android中对NFC的实现代码分布在如下几个地方:
- android自定义view属性