有两个EditText
,在加载页面时在第一个EditText中设置了一个文本,所以现在光标将在EditText
的起始位置,我想在不包含数据的第二个 EditText 中设置光标位置.如何做到这一点?
There are two EditText
,while loading the page a text is set in the first EditText, So now cursor will be in the starting place of EditText
, I want to set cursor position in the second EditText which contains no data. How to do this?
position是int:
Where position is an int:
editText1.setSelection(position)
这篇关于如何在 EditText 中设置光标位置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!