How to clear controls and value when navigating between screen.
I have developed a small application for practice which has login screen and once logged there will be sign out button.following are my questions
- When i click sign out now i simple navigated to the home login page using APP.to but how to make sure when i click sign out i clear the variable are screens and return to home login page.
- When try to navigate to already existing page i get error saying cannot create duplicate controls and does not navigate to next screen.I am using XML views
- What the performance related to tips to be take care while create controls and navigating across views
In this example, we show that we can use a model to clear the value of a dialog. You may want to adapt it to your case. Of course, you can clear the value. However, we always advocate using model so that we have the MVC in place; and make your implementation cleaner. That's it does not matter, you have using a input control or other controls. So long as the value in the model is clear, the value of the control will be clear accordingly.
Hope this helps.