如何更安全地向Fragment传递参数呢,这里建议大家使用Google官方推荐的setArguments方法

Fragment设置Bundle

Bundle bundle = new Bundle();
bundle.putString("email", email);
fragment.setArguments(bundle);

onCreateView中获取Bundle

Bundle bundle = getArguments();
email = bundle.getString("email");