在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();
}
本文转载自海 子博客园博客,原文链接:http://www.cnblogs.com/SharkBin/p/6773400.html如需转载自行联系原作者