您的位置:首页 > 移动开发 > Android开发

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  android