title: How Pass a complete TextView Object to another activity (or Save it and Reuse later)
body: <p>I am developing an android app which is used to add text on image and do some editing. I have the main image editing activity (mainEditActivity) where I have my image, textview and editing panel. I can change the selected image in two ways</p>
  
  <ol>
  <li>Select one from the gallery which used the following code</li>
  </ol>
  
  <blockquote>
  <pre><code>pickGalleryBtn.setOnClickListener((View view) -&gt; {
              Intent intent = new Intent();
              intent.setType("image/*");
              intent.setAction(Intent.ACTION_GET_CONTENT);
              startActivityForResult(Intent.createChooser(intent, "Select Picture"), PICK_IMAGE);
          });
  </code></pre>
  </blockquote>
  
  <p>and on activity result</p>
  
  <pre><code> @Override
      public void onActivityResult(int requestCode, int resultCode, Intent data) {
          if (requestCode == PICK_IMAGE &amp;&amp; null != data) {
              Uri selectedImageUri = data.getData();
              Intent intent = new Intent(mainEditActivity, ImageCropActivity.class);
              intent.putExtra("image.url", selectedImageUri.toString());
              mainEditActivity.startActivity(intent);
          } else {
              Toast.makeText(getContext(), "There was an error reading the file", Toast.LENGTH_LONG);
          }
      }
  </code></pre>
  
  <p>ImageCropActivity will start the MainEditActivity after cropping the image</p>
  
  <ol start="2">
  <li>The user can also download an image by going to another page, which will again go through ImageCropActivity and land on MainEditActivity.</li>
  </ol>
  
  <p>My problem is when user is changing the image through any of the above ways, the preferences (such as, text size, position, color, font ..) set on the textview is getting lost as the MainEditActivity restarts.</p>
  
  <p>Is there any way I can save the textView itself (not just the text) so the user will not lose the preferences. I have tried, passing data intent, sharedprefrences, savedinstancestate etc but they will only allow String or Serializable object (TextView is not serializable)</p>