Fork this repo and add the following functionality to this Android App. Once you are finished, send us a link to your fork.
-
Inside
com.gloveboxapp.androidchallenge.data
there exists two json files,policies.json
andpolicy_types.json
. Create two methodsgetPolicies
andgetPolicyTypes
to fetch and parse these two json files into Kotlin data classes to be used within the app. -
On the home screen
HomeFragment
, load the policies fromgetPolicies
/policies.json
in a list (RecyclerView). -
These policies should get stored in our singleton repository class
GloveBoxRepository.kt
and retrieved byHomeViewModel
. -
Group the records in the policies array by
carrierID
then render one list for each carrier - with each list containing the policies associated with that carrier. -
Style with Android material design.
-
Place an edit button on each policy. When clicked show a policy edit form with the following:
- Select input with options populated from the
policy_types.json
. The default option selected should reflect the current policy type. - Save button that when pressed persists the policy type update into the policies redux store and hides the edit form.
- Select input with options populated from the
- Both the policies array retrieved from
getPolicies
and the policyTypes array fromgetPolicyTypes
should be stored inGloveBoxRepository.kt
. - The update policy type form, when submitted should update the policy type for the appropriate policy inside the redux store
- Both the
getPolicies
andgetPolicyTypes
methods should be called only once per application load - The UI should look good in both with elements wrapping when necessary. The design should be simple and modern with space around each element.