Merge pull request #3503 from sigmabeta/android-rotation-bugfix

[Android] Don't show screenshot on rotation events
This commit is contained in:
Ryan Houdek 2016-01-12 10:38:44 -05:00
commit d5d6226fbb

View File

@ -138,6 +138,8 @@ public final class EmulationActivity extends AppCompatActivity
mScreenPath = gameToEmulate.getStringExtra("ScreenPath");
mPosition = gameToEmulate.getIntExtra("GridPosition", -1);
if (savedInstanceState == null)
{
Picasso.with(this)
.load(mScreenPath)
.noFade()
@ -180,8 +182,6 @@ public final class EmulationActivity extends AppCompatActivity
}
});
if (savedInstanceState == null)
{
// Instantiate an EmulationFragment.
EmulationFragment emulationFragment = EmulationFragment.newInstance(path);
@ -190,6 +190,11 @@ public final class EmulationActivity extends AppCompatActivity
.add(R.id.frame_emulation_fragment, emulationFragment, EmulationFragment.FRAGMENT_TAG)
.commit();
}
else
{
mImageView.setVisibility(View.GONE);
mFrameEmulation.setVisibility(View.VISIBLE);
}
if (mDeviceHasTouchScreen)
{