Skip to content

Create a questionnaire fragment;

Tyler Sizse requested to merge issue_123_create_a_fragment into master

Closes #123 (closed). After successfully scanning a barcode to check-in the guest needs to be asked a set of questions about their visit. Create the fragment and its layout that will retrieve the users answers to these questions, that will later be sent to a local database.

TESTING: Navigate to the guest visit scanner in the app (Guest Forms -> Guest Visit Check In (Local Database)). Scan a Code 39 barcode and press the Confirm Scan button. You should now see the questionnaire fragment. To test it fill out the questionnaire or leave it blank and test that the fields are being properly saved on rotation. After that press the submit button. Check the logs to make sure you see a log of all the answers you entered. You should see a statement like the following: D/GuestQuestionnaireFragment: Guest's Answers: [ABC-1234, null, null, null, Yes] The values inside the brackets are in respective order of the questions. null values means there was no text entered into the field. Confirm that you are getting a statement similar to this with the correct values.

NOTE: I renamed the guest_visit_nav_graph.xml to nav_graph_guest_visit.xml to match other file labeling.

NOTE: I also updated the appcompat implementation from 1.1.0 to version 1.3.0-alpha02 to fix issues with getParentFragmentManager().setFragmentResult() method.

NOTE: Because of the appcompat update some permission request and check methods became deprecated. I updated the way that GuestScanFragment.java checks for the Camera permission

Edited by Tyler Sizse

Merge request reports