EditText中有一些预置文本的时候,想把光标调到最前面,一开始是使用的

Editable etable = et.getText(); 

Selection.setSelection(etable,0);

结果发现在三星P1000上面有问题。经过研究发现需要先调用EditText.requestFocus,再调用Selection.setSelection(etable,0);。否则的话,在2.x的机器上有问题,但3.x上面是好着的。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2021-07-27
  • 2022-12-23
相关资源
相似解决方案