package com.madisp.bad.demo;

import android.app.Activity;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;

/**
 * Created with IntelliJ IDEA.
 * User: madis
 * Date: 3/20/13
 * Time: 8:44 AM
 */
public class MainActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		View v = new FrameLayout(this);
		v.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
		v.setId(R.id.mainContainer);
		setContentView(v);


		FragmentTransaction ft = getFragmentManager().beginTransaction();
		ft.add(R.id.mainContainer, new ListFragment());
		ft.commit();
	}
}

@@ -657,17 +657,53 @@
 ew(v);%0A%0A
-%0A
+%09%09if (savedInstanceState == null) %7B%0A%09
 %09%09Fragme
@@ -762,16 +762,17 @@
 tion();%0A
+%09
 %09%09ft.add
@@ -815,16 +815,17 @@
 t());%0A%09%09
+%09
 ft.commi
@@ -829,13 +829,17 @@
 mmit();%0A
+%09%09%7D%0A
 %09%7D%0A%7D%0A

Fix orientation flips for demo