title: Passing data in a ordered way to another activity
body: <p>I have a list of college careers, choosing one of the options takes me to a LinearLayout with multiple spinners, which contain class schedules. What is selected in the spinner, is sent to a "textview1" in the same activity. </p>
  
  <p>My question is what would be the best way to put in another activity, in an ordered way, the information within the "textview1"? And of course be saved there. </p>
  
  <p>I have some example code , using a clickable button that only sends the data, there is another button that allows me to start the another activity when you want to see it, but the problem is to organize the information in the second activity, do I really have to do so many strings? I hope you can help me to find a better way. I also want to say that this application is directed to the 2.1 api, if that matters.</p>
  
  <p>Activity1=Administracion.java</p>
  
  <pre><code>public class Administracion extends Activity {
  
  
  
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.administracion);
  
          final TextView lblMensaje = (TextView)findViewById(R.id.LblMensaje);
          final Spinner cmbOpciones = (Spinner)findViewById(R.id.CmbOpciones);
  
          final String[] datos =
                  new String[]{"0031711 Lab Biologia","Lun-Mar 9:30am prof. Marcarian","Elem3","Elem4","Elem5"};
  
  
          ArrayAdapter&lt;String&gt; elefante =
              new ArrayAdapter&lt;String&gt;(this,
                  android.R.layout.simple_spinner_item, datos);
  
  
          elefante.setDropDownViewResource(
                  R.layout.multiline_spinner_dropdown_item);
  
  
  
          cmbOpciones.setAdapter(elefante);
  
          cmbOpciones.setOnItemSelectedListener(
              new AdapterView.OnItemSelectedListener() {
                  public void onItemSelected(AdapterView&lt;?&gt; parent,
                      android.view.View v, int position, long id) {
                          lblMensaje.setText("Seleccionado: " + datos[position]);
  
  
  
                  }
  
                  public void onNothingSelected(AdapterView&lt;?&gt; parent) {
                      lblMensaje.setText("");
                  }
  
          });
  
  
          final TextView lblMensaje1 = (TextView)findViewById(R.id.LblMensaje1);
          final Spinner cmbOpciones1 = (Spinner)findViewById(R.id.CmbOpciones1);
  
          final String cuervo[] =
             new String[] {"00311712 Biología I","Mar-Jue 7:00am Prof.Briceño","Elem3","Elem4","Elem5"};
  
       ArrayAdapter&lt;String&gt; adaptador1 =
          new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_spinner_item, cuervo);
  
  
  
      adaptador1.setDropDownViewResource(
              android.R.layout.simple_spinner_dropdown_item);
  
  
  
      cmbOpciones1.setAdapter(adaptador1);
  
      cmbOpciones1.setOnItemSelectedListener(
          new AdapterView.OnItemSelectedListener() {
              public void onItemSelected(AdapterView&lt;?&gt; parent,
                  android.view.View v, int position, long id) {          
                      lblMensaje1.setText(cuervo[position]);
  
              }
  
              public void onNothingSelected(AdapterView&lt;?&gt; parent) {
                  lblMensaje1.setText("");
              }
  
  
      });
      Button BotonPasar1;
      BotonPasar1 = (Button)findViewById(R.id.VB1);
       BotonPasar1.setOnClickListener(new View.OnClickListener(){
  
          public void onClick(View v) {
                // TODO Auto-generated method stub
  
              String Aguila;
              String Canario;
                Aguila = lblMensaje.getText().toString();
                Canario = lblMensaje1.getText().toString();
                SharedPreferences mypreferences = getSharedPreferences("myPrefs", Context.MODE_PRIVATE);
                SharedPreferences.Editor editor = mypreferences.edit();
                editor.putString("Canario", Aguila);
                editor.commit();
  
                SharedPreferences mypreferences1 = getSharedPreferences("myPrefs", Context.MODE_PRIVATE);
                SharedPreferences.Editor editor1 = mypreferences1.edit();
                editor1.putString("Canario", Aguila);
                editor1.commit();
  
          }
  
      });
       Button BotonPasar2;
       BotonPasar2 = (Button)findViewById(R.id.VB2);
        BotonPasar2.setOnClickListener(new View.OnClickListener(){
  
          public void onClick(View v) {
                // TODO Auto-generated method stub
              Intent pasarahorario = new Intent("com.reversiblelabs.unisvenecas.udobeta.HORARIO");                          
            startActivity(pasarahorario);
  
          }
  
       });
  
  
      }
  
  }
  </code></pre>
  
  <p>Activity 2 = Horario.java</p>
  
  <pre><code>public class Horario extends Activity{
  
      TextView llegada, llegada2, llegada3, llegada4;  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          // TODO Auto-generated method stub
          super.onCreate(savedInstanceState);
          setContentView(R.layout.horario);
            llegada = (TextView) findViewById(R.id.tv1); 
            llegada2 = (TextView) findViewById(R.id.tv2);
            SharedPreferences mypreferences = getApplicationContext().getSharedPreferences("myPrefs", Context.MODE_PRIVATE);
            SharedPreferences mypreferences1 = getApplicationContext().getSharedPreferences("myPrefs", Context.MODE_PRIVATE);
            String teamnamestring = mypreferences.getString("canario", "no_name");
            String hola = mypreferences1.getString("Canario","no_name");
            llegada.setText(teamnamestring);
            llegada2.setText(hola);
  </code></pre>
  
  <p>Here is the first activity, the last botton send the data on the textwiews to the second activity, and the first button start the second activity.</p>
  
  <p><a href="http://i48.tinypic.com/jhagxl.png" rel="nofollow">1st Activity</a></p>
  
  <p>Whatever you choose on your spinner, would be seen on its own textview.</p>
  
  <p>Now here is the second activity, I want the data to get organized vertically by hours</p>
  
  <p>7:00 9:00        math</p>
  
  <p>9:00 11:00       chemestry </p>
  
  <p>11:00 1:00       extra</p>
  
  <p><a href="http://i48.tinypic.com/n6oo00.png" rel="nofollow">2nd Activity</a></p>
  
  <p>What I can do to acomplish this? </p>