我知道我可以创建片段并通过Tag或Id添加它。是否可以使用任何一个?为什么我应该使用一个吗?有什么原因吗?通过Tag或Id访问片段之间的区别
model = new ModelFragment();
//tag
getSupportFragmentManager().beginTransaction().add(model, "tag").commit();
//id
getSupportFragmentManager().beginTransaction().add(4, model).commit();
您能提供一个指向Android文档的链接吗? –