title: Sharing data between two fragments
body: <p>I'm currently trying to make a create account fragment and a choose profile pic fragment. </p>
  
  <h3>Fragment A/create account:</h3>
  
  <p>This houses Edittextfields for name, password, E-mail address.
  There is also an Image view which represents the profile pic.
  This Image view has a button on the side, which I want to use to switch over to Fragment B.</p>
  
  <p><a href="https://i.stack.imgur.com/SdloB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SdloB.png" alt="Design of the Fragment"></a></p>
  
  <h3>Fragment B/Choose Profile Pic:</h3>
  
  <p>Fragment is just an Image view and a couple of Image Buttons.</p>
  
  <p><a href="https://i.stack.imgur.com/CtJyS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CtJyS.png" alt="Design of the Fragment"></a></p>
  
  <h3>My Problem</h3>
  
  <p>Let's say the user has typed in all information on Fragment A and now wants to choose a profile pic, how do I save all the data temporary which is entered in Fragment A. 
  The second question is then, when the user clicks the Accept button on Fragment B, how do I sent the chosen Pic to Fragment A. So that I can switch over to Fragment A and restore the previously saved information and receive the drawable Image which the user has selected, to display it in the Image view.</p>