在Activity 1
Intent intent = new Intent(mContext, VegetableParameterControlPrivateActivity.class);
intent.putExtra("is_display_button","1");//显示按钮:1 隐藏按钮:0
intent.putExtra(ProjectConstant.VEGETABLE_PARAMETER_IS_SPRAY,model.getIsSpray());
mContext.startActivity(intent);
在Activity 2
private String isDisplayButton = "1";//显示按钮:1 隐藏按钮:0
private String strIsSpray = "0";
if(mIntent.getStringExtra("is_display_button") != null){
isDisplayButton = mIntent.getStringExtra("is_display_button").toString();
}
if(mIntent.getStringExtra(ProjectConstant.VEGETABLE_PARAMETER_IS_SPRAY) != null){
strIsSpray = mIntent.getStringExtra(ProjectConstant.VEGETABLE_PARAMETER_IS_SPRAY).toString();
}