- 获取光标位置
int index = editText.getSelectionStart();
2.在光标处插入字符
int index = editText.getSelectionStart();
Editable editable = editText.getText();
editable.insert(index, “testtest”);
3.删除光标前字符
int index = editText.getSelectionStart();
Editable editable = editText.getText();
editable.delete(index-1, index); void android.app.Activity.setTitle(int titleId)
Change the title associated with this activity. If this is a top-level activity, the title for its window will change. If it is an embedded activity, the parent can do whatever it wants with it.BitmapFactory.decodeResource(res, id);
android 基础知识
最新推荐文章于 2024-05-08 16:08:53 发布