InputView
InputView 是一个基础实现,提供在限定 Rectangle 内绘制和修改文本的功能。
InputView input = new InputView();
String text = input.getInputText();
默认绑定
默认的 view commands 有
命令 | 描述 |
---|---|
LEFT |
光标左移 |
RIGHT |
光标右移 |
DELETE_CHAR_LEFT |
删除左侧字符 |
DELETE_CHAR_RIGHT |
删除右侧字符 |
默认的 key bindings 有
命令 | 描述 |
---|---|
CursorLeft |
绑定的 ViewCommand LEFT |
CursorRight |
绑定的 ViewCommand RIGHT |
Backspace |
绑定的 ViewCommand DELETE_CHAR_LEFT |
Delete |
绑定的 ViewCommand DELETE_CHAR_RIGHT |