I need to implement an edittext field that allows the user to enter from 20 to 60. If the user enters a number that is out of range, a dialog box appears and forces the user to enter it again.
Thus, the text observer is not useful because it cannot prevent the user from entering a number less than 20.
OnFocusChangedListener is not, if the user clicks the "done" button, the edittext will not lose focus, so the trigger does not work.
In addition, the edittext is inside the tab view, so when the user clicks on another tab, the trigger fires, but the user can no longer enter a value for this edittext.
If you have any idea about this, plz share with me.
Thank you very much.
source share