0

I have been building an application. One of the activity involves two EditText fields. The first field sets the title and the second field sets the text which the user enters. The title and the text gets saved and the title gets displayed in a customised list view. Now when I click on the title displayed in the list.An new Activity opens up.Which has the same title as the one clicked in the list.But the problem here is the corresponding text which the user entered, does not gets displayed.I've been searching for this but couldn't actually reach anywhere.Could someone please help me with this.I'd really appreciate it:)Thanks.

4

2 回答 2

2
   EditText ed;
   ed.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            String s=ed.getText().toString();
            Intent i=new Intent(TestpjtActivity.this,classname.class);
            i.putExtra("editvalue", s);
                            startActivity(i);
        }
    });
于 2012-04-25T05:44:32.313 回答
0

@android noob,您可以为此使用 Intent 和 Bundle

于 2012-04-25T05:39:32.970 回答