Kaydet (Commit) 74d2bcf6 authored tarafından Michael Meeks's avatar Michael Meeks

fdo#60054 - sdremote - handle rotation without causing issues.

It seems there was a misunderstanding of onCreate's savedInstanceState cf.
http://developer.android.com/reference/android/app/Activity.html
Apparently we go through a onStop / onCreate cycle when rotating,
that triggered this.

Change-Id: I7cb1cf29bcae59ef26cf3bf0c2b3dd028eb8f878
üst f3d360e4
......@@ -71,18 +71,16 @@ public class PresentationActivity extends SherlockFragmentActivity {
//((FrameLayout) findViewById(R.id.framelayout)).addView(mLayout);
setContentView(R.layout.activity_presentation);
if (savedInstanceState == null) {
mPresentationFragment = new PresentationFragment();
mPresentationFragment = new PresentationFragment();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction();
fragmentTransaction.add(R.id.presentation_interceptor,
mPresentationFragment, "fragment_presentation");
fragmentTransaction.commit();
}
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction();
fragmentTransaction.add(R.id.presentation_interceptor,
mPresentationFragment, "fragment_presentation");
fragmentTransaction.commit();
mOuterLayout = (FrameLayout) findViewById(R.id.framelayout);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment