Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android how to determine if the edit text focus changes

for (EditText view : editList){
   view.setOnFocusChangeListener(focusListener);
}
....
private OnFocusChangeListener focusListener = new OnFocusChangeListener() {
    public void onFocusChange(View v, boolean hasFocus) {
        if (hasFocus){
             focusedView = v;
        } else {
             focusedView  = null;
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #android #determine #edit #text #focus
ADD COMMENT
Topic
Name
9+7 =