What im wondering is, should i hide "continue" button while EditText is empty? Is there a principle not recommending that? Alternative solution is popping up error dialog warning user to enter text. Thanks.
Asked
Active
Viewed 58 times
-2
-
You should ask such question on the UX stackexchange. – Mekap Apr 23 '15 at 06:23
-
use `edit text's` `addontextchangelistener` to react on text changes. – Nitin Misra Apr 23 '15 at 06:23
-
@NitinMisra im OK with development, but thanks for your reply. – eden Apr 23 '15 at 06:25
-
I am not sure this will answer your question, showing a popup is better idea because user will know exactly where is the issue. – Raghavendra Apr 23 '15 at 06:28
-
Simply check `if(edittext.getText().toString().length ==0)` then hide your button. – Piyush Apr 23 '15 at 06:29
-
@raghavendra nice approach. if you add document about it i can accept your answer – eden Apr 23 '15 at 06:30
-
I guess an error dialog would be more appropriate. – Neal Ahluvalia Apr 23 '15 at 06:30
-
@EnieJakiro Pardon, i got you question now, you should utilize button's disable state until a text has been entered (hiding button or showing a popup dialog is not better solution), try not to use popup dialogs as it degrades user experience. – Nitin Misra Apr 23 '15 at 06:32
-
it is better to show error instead of hiding a button. And for showing an error in edittext you can use edittext.setError(). On click of continue button you can show error message using edittext.setError(). As if you disable continue button then would require to pass an hint that until information is not provided continue button will not be enabled. – Rajen Raiyarela Apr 23 '15 at 06:33
-
Even though I have proposed a popup, but as @Rajen Raiyarela said editText.setError() is better, see this link once if you like it http://www.coderzheaven.com/2012/09/18/show-error-edittext-seterror-android/ – Raghavendra Apr 23 '15 at 06:36
1 Answers
0
It would be better to use Text Validator, so that user will click continue, then popup will appear near the text and show what is going wrong with certain field.
It may be similar to something like this:

MBH
- 16,271
- 19
- 99
- 149