Fix bugs in FragmentLayoutSupport sample in Support4Demos

Change-Id: I6b2828f8f6510e34cc11c3dc24b5022b241bd542
This commit is contained in:
Adam Powell
2013-08-12 13:46:50 -07:00
parent a6b4e7e3b2
commit 3c16ec8855

View File

@@ -152,14 +152,10 @@ public class FragmentLayoutSupport extends FragmentActivity {
// Execute a transaction, replacing any existing fragment
// with this one inside the frame.
FragmentTransaction ft = getFragmentManager().beginTransaction();
if (index == 0) {
ft.replace(R.id.details, details);
} else {
ft.replace(R.id.a_item, details);
}
ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
ft.commit();
getFragmentManager().beginTransaction()
.replace(R.id.details, details)
.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
.commit();
}
} else {