使用activity返回数据时候,按返回键后传递数据
要重写返回的函数
public void onBackPressed() {
// TODO Auto-generated method stub
Bundle data2=new Bundle();
data2.putSerializable("product", product);
data2.putSerializable("custom", (Serializable)customlist);
Intent intentreturn = new Intent(GoldDetails.this, ProductsAllShow.class);
intentreturn.putExtras(data2);
GoldDetails.this.setResult(0,intentreturn);
GoldDetails.this.finish();
}