android - How to check an EditText has focus? -


how check edittext has focus? there method boolean hasfocus()

yes, hasfocus() there, inherited android.view.view

another way achieve

edittext et = (edittext) findviewbyid(r.id.edittxt);  if(this.getcurrentfocus().getid() == et.getid()){     // view in focus }else{     // not in focus } 

Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

c++ - Serialize a class with a Qlist of custom classes as member (using QDataStream) -

Read video using VideoReader function in Matlab? -