It is very common for Android app to display and hide UI elements. For example, when you signup an account, there may be 3 pages,
Enter phone number page-> Receive msg verification page -> Enter username and password page
I wonder what is the best design pattern for this? My first thought is using mvc and state machine. View layer is only responsible for UI elements' visibility. Every page will be a state, when entering to a different state, I will enable some elements and disable some elements. But in this way, I have to implement many states if there are many different pages. Any thoughts?
Aucun commentaire:
Enregistrer un commentaire