Intent

在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();
}
 
 
 
posted @ 2017-04-27 11:39  杨斌_济南  阅读(239)  评论(0编辑  收藏  举报