Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating last screens needed for Account Creation: ProfileSetupFragment{ } and EditTrustedContactsFragment{ } #8

Open
14 of 31 tasks
jmnguyen1999 opened this issue Apr 10, 2021 · 1 comment
Assignees
Labels
todo Needs to be done - not an error yet
Projects
Milestone

Comments

@jmnguyen1999
Copy link
Contributor

jmnguyen1999 commented Apr 10, 2021

  • ProfileSetupFragment = screen to set up all REQUIRED user information before can start buddying! PIN #, profile picture, and Trusted Contacts

  • EditTrustedContactsFragment = separate screen linked from ProfileSetupFragment for the user to set up multiple Trusted contacts.

  • **Note: Lots of sample code is already written on similar Fragments to display how the interface, StartActivity, and fragments work together, it should help you get started! Also, a ton of this is much more intricate to implement than the other issues, so don't feel pressured to finish everything if you don't have the time for it!

  • Following the wireframes on README, create layout.xml files and implement Fragments for: "Profile Setup Screen" and "Edit Trusted Contacts Screen"

    • ProfileSetupFragment{ }:

      • invoked by either LoginFragment - when user registered AND logged in, but not yet setup profile
      • or by RegisterTwoFragment - when user just registered official account in Parse database
      • Expect to receive the User object we are creating! (B/c we are still building the profile of a to-be-created and not logged in user)
      • create instance of SAFragmentsListener{ }
        • e.g. private SAFragmentsListener SAListener;
      • attach this instance to StartActivity (which implements SAFragmentsListener)
        • e.g. SAListener = (SAFragmentsListener) context;
      • on "Take a Photo" button:
        • Intent to Camera (just like in last Instagram project)
      • on "Upload from Gallery" button:
      • Next to the "Set Trusted Contacts" button (as shown in wireframes):
        • display status: "not done" in red when user not yet have 1 Trusted contact
        • display status "completed" in green, when user has at least 1 Trusted contact
      • on click "Set Trusted Contacts" button:
        • call SAListener.toEditTrustedContacts(User object);
      • on clicked (1) on menu (3 horizontal lines) icon in top navigation bar and clicked (2) "Log out" button:
        • call SAListener.toLoginFragment();
        • Purpose: Allows user to log out without setting up a profile! Profile setup will be enforced in LoginFragment by another issue.
      • On "Complete Profile" button AND if profile pic, PIN, and trusted contacts != null:
        • set user's profileSetUp = true;
        • Check if there is a current user logged in:
          • e.g. if(ParseUser.getCurrentUser() == null)
          • Log the user in! (e.g. when just created account from RegisterTwoFragment)
            • otherwise --> the user was logged in by LoginActivity and just needed to finish setting up the profile
        • Intent to MainActivity

    • EditTrustedContactsFragment{ }:

      • invoked by either ProfileSetupFragment or SettingsFragment
      • Expect to receive the User object we are creating! (B/c we may still building the profile of a to-be-created and not logged in user)
      • Creates a TrustedContact object and uses TrustedContact's setter method to POST request with the Parse database! (must wait for Parse and java models to be done by another issue)
        • Each TrustedContact is inputted into the User's trustedContact's list!
      • create instance of SAFragmentsListener and connect to StartActivity in the same way{ }
        • e.g. private SAFragmentsListener SAListener;
        • SAListener = (SAFragmentsListener) context;
      • Max of 5 Trusted Contacts
      • RecyclerView and Adapter used (to display a Trusted Contact in a format on every row):
        • Every RecyclerView row/Adapter .xml displays Trusted Contact’s:
          • First name
          • last name
          • Relationship to user
          • mobile phone number
          • email
        • Displays the current Trusted Contacts if any
          • On long click (or whatever you prefer to edit a row):
            • Opens Dialog box to edit the current contact or delete it entirely
            • NOTE: Dialog Box is essentially a little pop up form or message that can take a small number of user inputs and act on it. It shouldn't be extremely hard to implement
        • If user has room to add more (e.g. current # of Trusted Contacts < 5)
          • Display a “+” or “add" button:
            • On click → display a different .xml on that row with empty containers to enter the needed info
        • Otherwise display message that user at the max Trusted Contacts allowed
      • on click back button or on click "save" button (wasn't included on the wireframe!)
        • call SAListener.toProfileSetup(User object);
  • For extra help on connections between interfaces, activities, and fragments:

    • You can see the example of how @jmnguyen1999 did her "Snapagram" this way with an in-class interface, under StartActivity.java and the StartActivity packaged Fragments!
@jmnguyen1999 jmnguyen1999 added the todo Needs to be done - not an error yet label Apr 10, 2021
@jmnguyen1999 jmnguyen1999 changed the title Creating last screens needed for Registering an account & Creating Profile Screen Creating last screens needed for Account Creation: ProileSetupFragment{ } and EditTrustedContactsFragment{ } Apr 10, 2021
@nhinguyen015 nhinguyen015 changed the title Creating last screens needed for Account Creation: ProileSetupFragment{ } and EditTrustedContactsFragment{ } Creating last screens needed for Account Creation: ProfileSetupFragment{ } and EditTrustedContactsFragment{ } Apr 10, 2021
@jmnguyen1999 jmnguyen1999 added this to the Sprint #1 milestone Apr 13, 2021
@nhinguyen015 nhinguyen015 added this to To do in Wings Apr 13, 2021
@nhinguyen015 nhinguyen015 moved this from To do to In progress in Wings Apr 13, 2021
@nhinguyen015
Copy link
Contributor

Update with launching camera and conntecting blank fragments

@jmnguyen1999 jmnguyen1999 moved this from In progress to Done in Wings Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Needs to be done - not an error yet
Projects
Wings
Done
Development

No branches or pull requests

2 participants