活动设置值
DetailFragment detailFragment = new DetailFragment(); Bundle args = new Bundle(); args.putInt("id", idList.get(i)); detailFragment.setArguments(args);
碎片获取值
Bundle bundle = getArguments(); id = bundle.getInt("id");
活动设置值
DetailFragment detailFragment = new DetailFragment(); Bundle args = new Bundle(); args.putInt("id", idList.get(i)); detailFragment.setArguments(args);
碎片获取值
Bundle bundle = getArguments(); id = bundle.getInt("id");