Try it yourself
You've isolated the category picker and the attachment logic into Fragment
classes in this chapter; now try writing a Fragment to encapsulate the contents of the first CardView
on the screen. Remember to rather push the ClaimItem
down into the Fragment
instead of having the Fragment
push the change events up to the Activity
. Name the new Fragment
class CaptureClaimDetailsFragment
and name its layout resource fragment_capture_claim_details.xml
.
You can also try pushing the logic to change the Category
of the ClaimItem
down into the CategoryPickerFragment
in a way similar to how the AttachmentPagerFragment
automatically adds new Attachments
to the ClaimItem
.