getFragmentManager()
.beginTransaction()
.addToBackStack(null) //将当前fragment加入到返回栈中
.replace(R.id.currentfragment, new Fragment2()).commit();
fragment之间跳转
最新推荐文章于 2024-06-06 20:44:29 发布