Kaydet (Commit) 3353687f authored tarafından Michael Meeks's avatar Michael Meeks Kaydeden (comit) Thorsten Behrens

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
(cherry picked from commit 74d2bcf6)
Signed-off-by: 's avatarThorsten Behrens <tbehrens@suse.com>
üst 04f4092f
...@@ -71,18 +71,16 @@ public class PresentationActivity extends SherlockFragmentActivity { ...@@ -71,18 +71,16 @@ public class PresentationActivity extends SherlockFragmentActivity {
//((FrameLayout) findViewById(R.id.framelayout)).addView(mLayout); //((FrameLayout) findViewById(R.id.framelayout)).addView(mLayout);
setContentView(R.layout.activity_presentation); setContentView(R.layout.activity_presentation);
if (savedInstanceState == null) {
mPresentationFragment = new PresentationFragment(); mPresentationFragment = new PresentationFragment();
FragmentManager fragmentManager = getSupportFragmentManager(); FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction(); .beginTransaction();
fragmentTransaction.add(R.id.presentation_interceptor, fragmentTransaction.add(R.id.presentation_interceptor,
mPresentationFragment, "fragment_presentation"); mPresentationFragment, "fragment_presentation");
fragmentTransaction.commit(); fragmentTransaction.commit();
}
mOuterLayout = (FrameLayout) findViewById(R.id.framelayout); 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