ANDROID中EDITTEXT如何定位光标位置

代码:edittext.setSelection(int);

范例:

 

et.setText(content);//设置EditText控件的内容
et.setSelection(content.length());//将光标移至文字末尾

相关文章:

  • 2022-02-06
  • 2021-11-20
  • 2022-01-22
  • 2022-12-23
  • 2019-05-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
相关资源
相似解决方案