title: Android studio - How to save data selected on previous activity
body: <p>This is a snippet of my code. The <code>Textview</code> acts as buttons and have <code>Onclicklistner</code> on them. When cpu1000 <code>Textview</code> is clicked it leads to the <code>cpu_g1000</code> class for which the code is shown below.</p>
  
  <pre><code>public class Game_1000 extends AppCompatActivity implements View.OnClickListener{
  
  private TextView cpu1000, mobo1000;
  
  TextView cpu, mobo;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_game_1000);
  
      cpu1000 = (TextView) findViewById(R.id.proName_G1);
      mobo1000 = (TextView) findViewById(R.id.moboName_G1);
  
      cpu1000.setOnClickListener(this);
      mobo1000.setOnClickListener(this);
  
      cpu = (TextView) findViewById(R.id.proNameG1000);
      cpu.setText(getIntent().getStringExtra("Processor"));
  
      mobo = (TextView) findViewById(R.id.moboNameG1000);
      mobo.setText(getIntent().getStringExtra("Motherboard"));
  }
  
  @Override
  public void onClick(View v) {
  
      if (v == cpu1000) {
          opencpu_g1000();
      }
      else if (v == mobo1000) {
          openmobo_g1000();
      }
  }
  
  public void opencpu_g1000() {
      Intent intent = new Intent(this, cpu_g1000.class);
      startActivity(intent);
  }
  
  public void openmobo_g1000() {
      Intent intent = new Intent(this, mobo_g1000.class);
      startActivity(intent);
  }
  </code></pre>
  
  <p>In this class, there are radio buttons. The users choose one of the choices and the choice is changed to strings. The strings are sent back to <code>Game_1000</code> class. The string then gets substituted with <strong>"Choose a processor"</strong> to show the new choice. The issue I am having is when I choose a motherboard the processor choice is reverted back to <strong>"Choose a processor"</strong> and the motherboard choice shows. I need both to show at the same time.</p>
  
  <pre><code>public class cpu_g1000 extends AppCompatActivity {
  
  Button button_save;
  RadioGroup rG;
  TextView tv;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_cpu_g1000);
  
      button_save = (Button) findViewById(R.id.Save_G1_cpu);
      rG = (RadioGroup) findViewById(R.id.cpu_RadioGrp);
      tv = (TextView) findViewById(R.id.proNameG1000);
  
      button_save.setOnClickListener(new View.OnClickListener() {
  
          @Override
          public void onClick(View view) {
  
              int selected_cpu = rG.getCheckedRadioButtonId();
              RadioButton selectedRadioButton = (RadioButton) findViewById(selected_cpu);
  
              String radioValue = selectedRadioButton.getText().toString();
  
              Intent intent = new Intent(cpu_g1000.this, Game_1000.class);
              intent.putExtra("Processor", radioValue);
              startActivity(intent);
  
          }
  
      });
  }
  </code></pre>
  
  <p><strong>Processor is chosen:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/c5HJS.png" alt="Processor is chosen"></p>
  
  <p><strong>Motherboard is chosen:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/bVLS1.png" alt="Motherboard is chosen"></p>
  
  <p><strong>Example of choices:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/DkgoE.png" alt="Example of choices"></p>
  
  <p>The previous choice are not recored and when a new choice is made the previous choice reverts back to "Please choose a processor" but I need both of the information to show. In my original code, I have more than just 2 choices but I shortened it to make it easier to read.</p>