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

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -