when i click the list view in the first class how will i get the datas stored in that list in my next activity??can someone help me out|?
<pre><code>public class GroceryList extends ListActivity {



                   Button btn_create;
    Cursor cursor;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    btn_create=(Button)findViewById(R.id.btn_create);
    btn_create.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            Log.d("rem", "msg");
            Intent in;
            in=new Intent(GroceryList.this,AddNote.class);
            startActivity(in);


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

<p>//here am bringing a list view for this activity and am taking the contents from the database.
        String[] from = { Notes.NOTE_TITLE, Notes.NOTE_DATE }; 
        int[] to = { R.id.shoppingnoteText, R.id.dateText}; 
        Cursor cursor = managedQuery(GroceryListContentProvider.NOTES_URI, null, null, null, null); </p>

<pre><code>    CursorAdapter adapter = new SimpleCursorAdapter(getApplicationContext(), R.layout.addnotelist, cursor,from,to);
    setListAdapter(adapter); 
}


@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
 //TODO Auto-generated method stub


  super.onListItemClick(l, v, position, id);
 Intent intent;


 intent=new Intent(GroceryList.this,shoppinglist.class);


 startActivity(intent);


}


}
</code></pre>

<hr>

<pre><code>public class shoppinglist extends Activity {

TextView shop,date;
Cursor cursor;
Button save1;


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.shoppinglist);

    //Cursor cursor = managedQuery(GroceryListContentProvider.NOTES_URI, null, null, null, null); 

    shop=(TextView)findViewById(R.id.shop);
    date=(TextView)findViewById(R.id.date);
   save1=(Button)findViewById(R.id.save1);
 Cursor cursor = getContentResolver().query(GroceryListContentProvider.NOTES_URI,null, null, null, null);
  cursor.moveToFirst();
   String s=cursor.getString(cursor.getColumnIndex(Notes.NOTE_TITLE));
        shop.setText(s);
   Log.d("2", "msg");
   date.setText(cursor.getString(cursor.getColumnIndexOrThrow(Notes.NOTE_DATE)));

    save1.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            // TODO Auto-generated method stub
            Intent in;
            in=new Intent(shoppinglist.this,GroceryList.class);


            startActivity(in);              

        }
    });



}


}
</code></pre>
