如何自动滚动文本编辑视图以使光标停留在屏幕上?

时间:2015-09-16 16:15:01

标签: android android-edittext android-webview

我使用扩展了WebView的库richeditor(https://github.com/wasabeef/richeditor-android)来创建一个富文本框。

当我输入RichEditor(在运行时)时,光标会随着按预期添加新行而下降。

如果您在像Evernote这样的应用程序中使用文本编辑器,则会在添加换行符时自动滚动,以便光标始终保留在屏幕中并显示给用户。

然后在我的应用程序中,当我输入新行时,光标向下并最终进入虚拟软键盘下方,这样我就看不到光标和新文本的输入。

我该如何解决这个问题。Notice the light gray color cursor. Here when I add 2 another lines cursor goes behind the black toolbox. I need to scroll the whole screen to avoid that.

0 个答案:

没有答案