diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java index f210008352..e0e5c2e9b4 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivity.java @@ -279,13 +279,6 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } mapView.refreshMap(true); - if (((app.getAppInitializer().isFirstTime() && Version.isDeveloperVersion(app)) - || !app.getResourceManager().isAnyMapIstalled()) && FirstUsageWelcomeFragment.SHOW) { - FirstUsageWelcomeFragment.SHOW = false; - getSupportFragmentManager().beginTransaction() - .add(R.id.fragmentContainer, new FirstUsageWelcomeFragment(), - FirstUsageWelcomeFragment.TAG).commitAllowingStateLoss(); - } mapActions.updateDrawerMenu(); drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); @@ -628,6 +621,14 @@ public class MapActivity extends OsmandActionBarActivity implements DownloadEven } } enableDrawer(); + + if (((app.getAppInitializer().isFirstTime() && Version.isDeveloperVersion(app)) + || !app.getResourceManager().isAnyMapIstalled()) && FirstUsageWelcomeFragment.SHOW) { + FirstUsageWelcomeFragment.SHOW = false; + getSupportFragmentManager().beginTransaction() + .add(R.id.fragmentContainer, new FirstUsageWelcomeFragment(), + FirstUsageWelcomeFragment.TAG).commitAllowingStateLoss(); + } } @Override diff --git a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java index 19bbc513c6..dce259113c 100644 --- a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java +++ b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWelcomeFragment.java @@ -14,6 +14,7 @@ import android.view.WindowManager; import android.widget.ImageView; import net.osmand.plus.R; +import net.osmand.plus.activities.MapActivity; public class FirstUsageWelcomeFragment extends Fragment { public static final String TAG = "FirstUsageWelcomeFragment"; @@ -54,5 +55,12 @@ public class FirstUsageWelcomeFragment extends Fragment { w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); } + ((MapActivity)getActivity()).disableDrawer(); + } + + @Override + public void onPause() { + super.onPause(); + ((MapActivity)getActivity()).enableDrawer(); } } diff --git a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java index 7de3fecbf9..73b6e162e6 100644 --- a/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java +++ b/OsmAnd/src/net/osmand/plus/firstusage/FirstUsageWizardFragment.java @@ -434,6 +434,18 @@ public class FirstUsageWizardFragment extends Fragment implements OsmAndLocation app.getAppInitializer().removeListener(this); } + @Override + public void onResume() { + super.onResume(); + ((MapActivity)getActivity()).disableDrawer(); + } + + @Override + public void onPause() { + super.onPause(); + ((MapActivity)getActivity()).enableDrawer(); + } + @Override public void updateLocation(final Location loc) { final OsmandApplication app = getMyApplication();