Android activities A which is a list activity , B is a detail information about list item
A is calling B and send data Id and Category
ListView lv = getListView();
lv.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
// getting values from selected ListItem
String newsid = ((TextView) view.findViewById(R.id.idTV))
.getText().toString();
Bundle bndl=new Bundle();
bndl.putString("id", newsid);
bndl.putString("cat", "sport");
bndl.putString("prev", "SPORTPANEL");
Intent in = new Intent("com.contact.lebadagency.SINGLECONTACTACTIVITY");
//in.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//in.putExtra("id", newsid);
//in.putExtra("cat", "sport");
in.putExtras(bndl);
startActivity(in);
}
});
and the second Activity B :
Intent in=new Intent();
in=getIntent();
Bundle bundle = this.getIntent().getExtras();
String news = bundle.getString("id").toString();
String cat = bundle.getString("cat").toString();
When i install and run the application i click on any item on A activity and the correct data shown , the problem is that first selected data is stuck in Activity B , Stuck forever on the Activity B, i click on other items in list A and the old (first selected item) is stuck.
I hope i describe my problem well, any help ?