Creating the data model
At this point in the application, it's time to build a simple data model that the user interface will back onto. Each claim will be represented by a ClaimItem object, and will contain any number of Attachment objects, each of which will reference the File that was attached, and have a marker to help decide how the attachment should be previewed. All these classes will need to be Parcelable, because they need to be saved in the CaptureClaimActivity. The CaptureClaimActivity will also use them as input and output parameters, and any time an object needs to be passed as a parameter to or from an Activity, it needs to be Parcelable.
You'll also be creating a Category enum that links the Android IDs to an internal model ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access