`
wanghaisheng
  • 浏览: 89825 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论

android EditText设置文字选中

阅读更多

android EditText中如何将输入框中的文字选中?

EditText edit 

       全部选中 Selection.selectAll(edit.getText);

       部分选中Selection.select(edit.getText,int index)或Selection.select(edit.getText,int start,int stop);

android EditText输入框中为空时,设置默认显示的文字

       xml:  android:Hint=""

       java: edit.setHint=""

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics