(Fragment fragment)
| 755 | } |
| 756 | |
| 757 | @Override |
| 758 | public void startDetailFragment(Fragment fragment) { |
| 759 | Log.d(TAG, "MainActivity->FragmentListener->startDetailFragment()"); |
| 760 | int container_id = (isTwoPane()) ? R.id.fragment_detail_container |
| 761 | : R.id.fragment_container; |
| 762 | FragmentTransaction tran = mFragment.beginTransaction().replace( |
| 763 | container_id, fragment, "detail_fragment"); |
| 764 | if (!isTwoPane()) { |
| 765 | tran.addToBackStack(null); |
| 766 | tran.commit(); |
| 767 | } else { |
| 768 | findViewById(R.id.fragment_detail_container).setVisibility( |
| 769 | View.VISIBLE); |
| 770 | tran.commitAllowingStateLoss(); |
| 771 | } |
| 772 | } |
| 773 | |
| 774 | private Fragment recreateFragment(Fragment fragment) { |
| 775 | Log.d(TAG, "recreateFragment()"); |
no test coverage detected