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 that can be stored without having to worry about the Android IDs changing their values as the application evolves.