1.bean类序列化实现
implements Serializable
2.Fragment动态注册广播
//1.this.foodbean
this.FoodBean();
//传值
intent.putExtra("food",foodBean);
3.广播页面getSerializableExtra("food");获取bean类
FoodBean food = (FoodBean) intent.getSerializableExtra("food");
Toast.makeText(context, "广播发送成功", Toast.LENGTH_SHORT).show();
Intent intent1 = new Intent(context, viewpaActivity.class);
intent1.putExtra("food",food);
intent1.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
context.startActivity(intent1);