android - edittext always gets back focus onFocusChange -
so code service call when edittext1 loses focus when click on edittext. focus same edittext1 everytime after service call. how can fix it. here code
edittext1.setonfocuschangelistener(new view.onfocuschangelistener() { @override public void onfocuschange(view v, boolean hasfocus) { if(!hasfocus) { if (edittext1.gettext().length() >= 5) { searchtask = new searchtask(); searchtask.execute(edittext1.gettext().tostring()); } } } });
try call edittext1.requestfocus();
after searchtask.execute(...);
Comments
Post a Comment