populating a textview of a class with data from another class
<p>i have developed some sms application and i cant figure out how to solve this issue...in one layout i am displaying two textviews to display the number and the date of the sms...that works fine...</p>

<p>but now i am implementing the onListItemClick and i want that when list item is clicked the whole messages from the database should load into the new view .... how can i accomplish that...</p>

<pre><code>protected void onListItemClick(ListView l, View v, int position, long id) {
        // TODO Auto-generated method stub
        super.onListItemClick(l, v, position, id);


        dba.open();

        Cursor c=dba.executeQuery("select rowid _id,* from messages where rowid="+position+";");
        Log.v(tag, "value count"+ c.getCount());
        if(c.getCount()&gt;0)
        {
            Log.v(tag, "value count"+c.getCount());
            c.moveToPosition(position);
                Intent intent = new Intent();

                String mesage = c.getString(c.getColumnIndex("msg"));

                Log.v("Value passed to class", mesage);
                intent.putExtra(name, mesage);

            intent.setClass(this, NewInterface.class);
            startActivity(intent);


        }

    }
</code></pre>

<p>and here is the code of the other class to which i am passing data..</p>

<pre><code>protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.messages);
        tv4 = (TextView) findViewById(R.id.tvMessages);
        Bundle bundle=getIntent().getExtras();
        if(bundle!=null)
        {
            Log.v("Value got from class", bundle.getString("name"));
            tv4.setText(bundle.getString("name"));
        }
</code></pre>
