1. Check out our app, Forums for Android! Download and leave feedback here!

Refocus on a lost focuschanged view

Discussion in 'Application Development' started by Leolicos, Jun 24, 2010.

  1. Leolicos

    Leolicos Well-Known Member
    Thread Starter
    15

    Jun 16, 2010
    54
    0
    15
    Senior Software Engineer
    Chicago, IL
    I have a few EditText views in my app. All the EditTexts are numbers. I have a focuschangedlistener on all of them and if a nonvalid number is entered once the focus is lost, in the focuschanged function with hasfocus == false, I want an alert to show, then the focus go back to that same EditText. The problem is at the .requestfocus(). It seems that once I lose focus and focus on another view, then focuschanged function is called which refocuses on the previous view but for some reason BOTH the newly focused view AND the previous view are both focused at the same time. Should I do this another approach instead of requesting focus in the focuschanged function?
     

    Advertisement

Share This Page

Loading...