【问题标题】:How to close soft keyboard and have a possibility to determine cursor position如何关闭软键盘并有可能确定光标位置
【发布时间】:2011-06-18 03:57:41
【问题描述】:

如何关闭软键盘并有可能通过在EditText中触摸位置来确定光标位置?

 InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);

它是隐藏软键盘,但我无法设置光标!如何解决这个问题?

【问题讨论】:

  • 怎么找地方?我触摸的地方&

标签: android keyboard cursor


【解决方案1】:

使用Selection设置光标位置,使用setSelection方法

【讨论】:

  • 怎么找地方?我触摸的地方&
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-05-21
  • 1970-01-01
  • 2012-03-29
  • 1970-01-01
  • 1970-01-01
  • 2013-10-26
  • 1970-01-01
相关资源
最近更新 更多