android 基础知识
2015-03-28 18:01
225 查看
获取光标位置
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);
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手机分辨率基础知识(DPI,DIP计算)
- android 基础知识
- Android 游戏开发必备的基础知识
- Android基础知识大纲
- Android常见的网络请求方式和基础知识
- Android 开发ABI的基础知识
- Android 基础知识点整理
- 3.基础知识Android_ArrayMap
- Android Studio 学习笔记一:Android基础知识
- Android数据库基础知识——SQLite数据库的使用
- Android基础知识
- android 基础知识二
- android 基础知识 九
- android 基础知识 十四
- android基础知识:加载较大分辨率图片到手机内存
- 记录一些android的基础知识
- Android常用基础知识个人总结(一)
- Android Map开发基础知识学习笔记
- Android基础知识-Activity