Home Activity Workflow - nagasudhirpulla/Debtonator GitHub Wiki
Summary
This activity displays the transaction set data and persons data.
We can navigate to load transaction sets page, transaction edit page, person summary page, transaction set summary page.
Workflow
Setting up Loaders and Textview
First check if the current transaction set id is not null. If null, open the transaction sets list activity.
Fetch the current Transaction set cursor by the available current transaction set id. If cursor is of length 0, make current transaction set shared preference as null and open the transaction sets list activity. Else get the name of the loaded Transaction set name into the activity instance variable.
On activity load, initialize the persons and transactions loaders and attach them to the list views.
For Person list, the query can be the person data accompanied by the the transaction set contribution, consumption, balance information of each person.
For Transaction list, the query can be the transaction details, contribution sum of each transaction.
Load Transaction Sets List Activity button Listener
Make the current transaction set shared preference as null and then launch the Transaction Sets List Activity
Person ListItemClick Listener
Get the id of the person from list item and Launch the Person Summary Activity with Person Id as bundle message
Transaction ListItemClick Listener
Get the id of the transaction from list item and launch the Transaction edit activity with Transaction Id as the bundle message