This weekend's changes to the Android MVC project include the following:
- Reorganization of the Command classes. AbstractBaseCommand has been created for simple get/set. All methods except "
execute" have been implemented. This class now forms the base forIdentityCommandas well asAbstractCommand. Controllernow has full support for forward as well as backward navigation.Controllercan now record the activity navigation. UsesActivityStackInfo.Controllernow support forward navigation with few more options:- Can optionally mark the command to not be recorded
- Can optionally reset the activity stack
Controllernow hasbackmethod for backward navigation.Controller, during forward navigation, manipulates the activity stack appropriately.- Missing part is handling failure scenario when receiving a response. When processing the response, if it is in "error" state, IMHO, the response must be handled by the same activity rather than launching a new one.
- More so, the command must be removed from the top of the stack if there was an error.
- The support for
IMemento,IInitializablehas been removed. Not required. - The initialize method, henceforth, has been removed from
BaseActivity. BaseActivitynow has two methodspreProcessDataandprocessDatacalled beforeonBeforeCreateand beforeonCreateContentrespectively.BaseActivitynow handles the back button (using the v2.0 functiononBackPressed) by calling the back method for navigation.- Developers using v1.6 can override the method
onKeyPressedand look for theKeyEvent.KEYCODE_BACKand call the methodback.
- Developers using v1.6 can override the method
- SplashActivity that happens to be the main launcher activity.
- Erstwhile MainActivity has been renamed to LoginActivity to reflect its purpose.
- HomeActivitiy continues to be the same.
- SplashActivity launches LoginActivity using IdentityCommand and sharing some data (using Tag)
- LoginActivity launches HomeActivity upon successful login (sharing some data using Tag and passing some piece of data to LoginCommand using Data).




