Merge pull request #1470 from trashkalmar/whatsnew-fix

[android] WhatsNew dialog fixes
This commit is contained in:
Dmitry Yunitsky 2016-01-19 16:35:09 +03:00
commit c56ed8fe92
6 changed files with 8 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 KiB

After

Width:  |  Height:  |  Size: 348 KiB

View file

@ -249,11 +249,14 @@ public class NewsFragment extends BaseMwmDialogFragment
if (Config.getLastWhatsNewVersion() >= BuildConfig.VERSION_CODE)
{
Fragment f = fm.findFragmentByTag(tag);
if (f != null)
{
fm.beginTransaction().remove(f).commitAllowingStateLoss();
fm.executePendingTransactions();
}
if (f == null)
return false;
// If we're here, it means that the user has rotated the screen.
// We use different dialog themes for landscape and portrait modes on tablets,
// so the fragment should be recreated to be displayed correctly.
fm.beginTransaction().remove(f).commitAllowingStateLoss();
fm.executePendingTransactions();
}
Config.setWhatsNewShown();