hi i am trying to create a main menu for my application.
My application has 2 activities: menu and mySecondAct
In the menu activity , two buttons are displayed, "new" and "load previous". Clicking new a second activity starts ("mySecondAct") and the user can dynamically change it's layout(tablelayout) adding textviews(rows).
If the user terminates the application and start it again he can load the previous state(the changes that he has made in the layout) by choosing "load previous" in the main menu, so i want to determine if he pressed new or load.
I have implemented this by using the method putExtra("choice", "new" or "load") in menu activity providing the user's choice to "mySecondAct" activity . if the string choise is equal to load a method is called (in mySecondAct)changing the layout to the previous one(loading some data that have been stored ). Is this the right approach ? Should i implement it in a diffferent way?
My application has 2 activities: menu and mySecondAct
In the menu activity , two buttons are displayed, "new" and "load previous". Clicking new a second activity starts ("mySecondAct") and the user can dynamically change it's layout(tablelayout) adding textviews(rows).
If the user terminates the application and start it again he can load the previous state(the changes that he has made in the layout) by choosing "load previous" in the main menu, so i want to determine if he pressed new or load.
I have implemented this by using the method putExtra("choice", "new" or "load") in menu activity providing the user's choice to "mySecondAct" activity . if the string choise is equal to load a method is called (in mySecondAct)changing the layout to the previous one(loading some data that have been stored ). Is this the right approach ? Should i implement it in a diffferent way?