开发者

android Editext setText should not focused and blinking cursor

in my activity

1 editext field and 2 check boxes

i do setText("default text") in oncreate.

when my application lods display default text also blinking cursor inside the text field also shows orange border tells it is having focus.

i don't want to be text field focus on create instead it should focus on some where else i di开发者_StackOverflow社区d request focus on rest of the checkboxes but it didn't work out textfield still having focus.


i fixed this problem myself

View okBtn =findViewById(R.id.tlSettingOK);
            okBtn.setFocusableInTouchMode(true);
            okBtn.requestFocusFromTouch();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜