How to display the same value in the editText comeback to previous Activity?
<p>I am using two editText boxes like "table no" and "no of guest". if I fill the editText box and select some items in the listView then go to the next activity and come back to previous activity again where the EditText box is available the value is empty. My requirement is that when I come back to the previous activity the EditText displays the data I've entered before. </p>

<p>SENDING EDITTEXT DATA:</p>

<pre><code>   b1.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {

                    //for (int i=0;i&lt;GlobalClass.myval.length;i++){

                   //System .out.println("Clicked--&gt;"+GlobalClass.myval[i]);

                    //}

            String tno = e1.getText().toString();
            int tn = Integer.parseInt(tno);

            Intent i=new Intent(getApplicationContext(),TicketActivity.class);
            Bundle b=new Bundle();
            b.putInt("Table No:", tn);
            i.putExtras(b);
            String et= e2.getText().toString();
            int et1 = Integer.parseInt(et);
            Bundle be=new Bundle();
            be.putInt("Guest:", et1);
            i.putExtras(be); 

            startActivity(i);



        }
    });
</code></pre>

<p>SECOND ACTIVITY:</p>

<pre><code>   public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.ticket);


t1=(TextView)findViewById(R.id.textView3);
t2=(TextView)findViewById(R.id.textView5);
l1=(ListView)findViewById(R.id.listView1);
or=(ImageButton)findViewById(R.id.imageButton7);
ho=(ImageButton)findViewById(R.id.imageButton4);
de=(ImageButton)findViewById(R.id.imageButton1);
pl=(ImageButton)findViewById(R.id.imageButton2);
mi=(ImageButton)findViewById(R.id.imageButton3);
pa=(ImageButton)findViewById(R.id.imageButton5);
pr=(ImageButton)findViewById(R.id.imageButton6);
// l1.setItemsCanFocus(false);
//l1.setFocusable(true);
//l1.setClickable(true);

//Get the Table no Value From Edit Text


Intent i1=getIntent();
Bundle b=i1.getExtras();
int num=b.getInt("Table No:");
pno=Integer.toString(num);
t1.setText(pno);

//Get The Guest Value From Edit Text
 Intent i2=getIntent();
 Bundle b1=i2.getExtras();
 int num1=b1.getInt("Guest:");
 pno1=Integer.toString(num1);
 t2.setText(pno1);




// List&lt;String&gt; st=GlobalClass.myval;

   //ArrayAdapter&lt;String&gt; ada = new ArrayAdapter&lt;String&gt;( this, android.R.layout.simple_list_item_1,st);

    l1.setAdapter(new EfficientAdapter(TicketActivity.this));

     l1.setOnItemClickListener(new OnItemClickListener(){
 public void onItemClick(AdapterView&lt;?&gt; parent,View view,int position,long id){

 st2=HomeActivity.select1[position];

    Toast.makeText(getApplicationContext(), "Selected:" + st2, Toast.LENGTH_SHORT).show();

    }
    });

 //GO TO PREV ACTIVITY:


    ho.setOnClickListener(new View.OnClickListener() {

    public void onClick(View v) {
        Intent o2=new Intent(TicketActivity.this,HomeActivity.class);

        startActivity(o2);

    }
  });

      }

    }
</code></pre>
