I've a listView with 10 items on it and an activity which contains a textView. I want to start the activity on listView ItemClick but with different textView in it. I am able to start the activity via intent but stuck how to change the value in textView . Is there any way to do this?
lv.setOnItemClickListener(new AdapterView.OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id){
switch (position){
case 0:
Intent myIntent = new Intent(ListActivity.this, Districts.class);
ListActivity.this.startActivity(myIntent);
//I want textView to display 'abc'
case 1:
Intent myIntent = new Intent(ListActivity.this, Districts.class);
ListActivity.this.startActivity(myIntent);
//I want textView to display 'xyz'
}
}
});