Skip to content

Ready: Issue 313 Data is Lost when Pressing Back in Guest Registration Fragments

Daniel Solash requested to merge 313-data-lost into main

License and Copyright Notice

By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).

Branch Name

313-Data-Lost

Related Issues

Issue #313 (closed)

Description

If user presses back button in the guest registration fragment all entered data was lost. An alert would show up letting the user decide if they want to go back or not. This was fixed by using the build in shared preference funcationality in android studio to carry over user entried that persist through pressing back. These shared preferenced are cleared every time the activity is closed and reopened.

Steps to Test

(List the steps needed to test this merge request here using bullets, for ex:)

  1. Load into guest registration. Enter information (aside from fragment 1 and 4).
  2. Press the back button
  3. Go forawrd into the fragment that was just left.
  4. The data should persist through constant back presses untill the guest registration activity is closed.

Developer Notes

  • Fragment 4 was excluded due to the phased nature of the fragment. It was difficult to get this to work correctly.
  • Shared preferences use a key value pair in order to pass values to a file.
  • An editor must be called in order to commit new entries into the shared preferences.
  • See: https://developer.android.com/training/data-storage/shared-preferences
Edited by Daniel Solash

Merge request reports