点击按钮返回上一个Fragment,可用于单Activity应用
FragmentManager manager = getSupportFragmentManager();
FragmentTransaction transaction = manager.beginTransaction();
transaction.replace(R.id.right_layout,fragment);
transaction.addToBackStack(null); //添加这句
transaction.commit();
网友评论