You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.
Application is not showing toast Please enter a valid name on incorrectly entering the Name of the user, the first time and it is also reflecting the change inside the dialog box.
Also I noticed this behavior:
Unless you enter a valid name, the incorrect name is not changed in the dialog box.
For Example: If you enter 666 after 5555555 in the dialog box above, it will show you toast but when you open it again it will show you 5555555 only.
If you enter the valid name first and then invalid name then it's not a problem. The above problem is faced only when entering incorrect name as the first edit after opening the activity.
If you enter a valid name after an invalid name then it is updated fine even in this case.
The text was updated successfully, but these errors were encountered:
I would like to work on this. UserSettingsActivity.java contains the code for this activity. The reason why the toast for "enter a valid name" does not come up the first time is because in line 104 of UserSettingsActivity.java, there is no code to show the Toast. The toast is shown only in the onPreferencesChange() function and this function executes only from the second time the name is changed.
The second issue you have mentioned is that the EditText shows the previously entered invalid name. This is because the shared preference is not reverted back when you enter an invalid name the first time. So, we must run a code similar to what is present in the onPause() function here.
This will solve the issues mentioned here. @sandarumk@abs51295 Can I send a PR fixing this?
Application is not showing toast
Please enter a valid name
on incorrectly entering the Name of the user, the first time and it is also reflecting the change inside the dialog box.Also I noticed this behavior:
Unless you enter a valid name, the incorrect name is not changed in the dialog box.
For Example: If you enter 666 after 5555555 in the dialog box above, it will show you toast but when you open it again it will show you 5555555 only.
If you enter the valid name first and then invalid name then it's not a problem. The above problem is faced only when entering incorrect name as the first edit after opening the activity.
If you enter a valid name after an invalid name then it is updated fine even in this case.
The text was updated successfully, but these errors were encountered: