Frage

Wenn Sie einen benutzerdefinierten Dialog in einem Android-App mit, wie ist es dann möglich, die Benutzer wissen zu lassen, dass er / sie ein falsches Argument eingegeben hat, zum Beispiel ein falsches Passwort oder Benutzername?

Mögliche ein Alertdialog oder nur ein Toast_Message?

Danke

War es hilfreich?

Lösung

You can add a textview to your customdialog, if the user/password combination fails, you only need to display this textview with the message wanted.

It will be better than AlertDialog, 2 consecutives dialog aren't good for the user. And the toast message are not always understandable for all users.

Andere Tipps

You can use whatever you want in principle. Flash the screen and all LEDs generate all possible sounds to make the phone R2D2s clone on speed.

On a more serious note. A Toast notification can be used but is not necessarily a good option since it could happen that the users just does not pay attentions and misses the whole notification resulting in a confused user as he is expecting the application to log him in.

Now there is the AlertDialog notification which is probably the most suitable notification type to inform a user about something critical he did or didn't. It requires users attention which is exactly what you want in such cases.

There would be the StatusBarNotification which is meant to display an ongoing process. Best example would be a download or something.

Another option would be an appearing TextView which needs to be distinctive enough to be easily noticed by the user and of course the layout has to be planned to support such dynamic changes.

My recommendation is the AlertDialog and if not applicable for some reason then the dynamic TextView.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top