fragment(パラメーター付き)生成
public static HogeFragment createInstance(String hoge)
HogeFragment fragment = new Hogeframent;
Bundle args = new Bundle();
bundle.putString("key",hoge);
fragment.setArgument(bundle);
return fragment
パラメーター取得
パラメーターの取得はonCreateメソッドなどでgetArgumentメソッドを使用して取得するといいらしいので
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(saveInstanceState)
Bundle bundle = getArguments();
String type = bundle.getString("key")
}