if (v == saver) {
String textData = reminder.getText().toString();
Intent intent3 = new Intent(CreateActivity.this, ViewActivity.class);
intent3.putExtra(textData, "key1");
startActivity(intent3);
}
列表活动中的
ListView list;
ArrayList<String> taskslist;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_view);
list = (ListView) findViewById(R.id.listView1);
taskslist = new ArrayList<String>();
final ArrayAdapter<String> adapter = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, taskslist);
list.setAdapter(adapter);
try {
String recivedData;
Intent intentt;
intentt = getIntent();
recivedData = intentt.getExtras().getString("key1");
taskslist = intentt.getStringArrayListExtra(recivedData);
} catch (Exception e) {
// TODO: handle exception
}
// adapter.notifyDataSetChanged();
}