summaryrefslogtreecommitdiffstats
path: root/samples/Support4Demos
diff options
context:
space:
mode:
authorAdam Powell <adamp@google.com>2013-08-12 14:02:15 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-08-12 14:02:15 -0700
commitba321696ddceb7996300cf7fe8027349ea9c9671 (patch)
treed1e1f714137db4ed599f9a93a605962917697950 /samples/Support4Demos
parent17f5e461746c952d9d8aa439b3aaa0e70ca7f9b4 (diff)
parente1d4743db13fc4f99f4608876f36d0e44e3f854a (diff)
downloadandroid_development-ba321696ddceb7996300cf7fe8027349ea9c9671.tar.gz
android_development-ba321696ddceb7996300cf7fe8027349ea9c9671.tar.bz2
android_development-ba321696ddceb7996300cf7fe8027349ea9c9671.zip
am e1d4743d: am 3c16ec88: Fix bugs in FragmentLayoutSupport sample in Support4Demos
* commit 'e1d4743db13fc4f99f4608876f36d0e44e3f854a': Fix bugs in FragmentLayoutSupport sample in Support4Demos
Diffstat (limited to 'samples/Support4Demos')
-rw-r--r--samples/Support4Demos/src/com/example/android/supportv4/app/FragmentLayoutSupport.java12
1 files changed, 4 insertions, 8 deletions
diff --git a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentLayoutSupport.java b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentLayoutSupport.java
index 8be83a6ba..1230dd31c 100644
--- a/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentLayoutSupport.java
+++ b/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentLayoutSupport.java
@@ -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 {