Fix 2.3 version

This commit is contained in:
GaidamakUA 2015-11-25 11:38:47 +02:00
parent 479922062f
commit 47fa5af8a6
2 changed files with 8 additions and 7 deletions

View file

@ -398,9 +398,9 @@ public class MapActivity extends AccessibleActivity implements DownloadEvents {
dashboardOnMap.setDashboardVisibility(true, DashboardOnMap.staticVisibleType); dashboardOnMap.setDashboardVisibility(true, DashboardOnMap.staticVisibleType);
} else { } else {
if (ErrorBottomSheetDialog.shouldShow(settings, this)) { if (ErrorBottomSheetDialog.shouldShow(settings, this)) {
new ErrorBottomSheetDialog().show(getFragmentManager(), "dialog"); new ErrorBottomSheetDialog().show(getSupportFragmentManager(), "dialog");
} else if (RateUsBottomSheetDialog.shouldShow(settings)) { } else if (RateUsBottomSheetDialog.shouldShow(settings)) {
new RateUsBottomSheetDialog().show(getFragmentManager(), "dialog"); new RateUsBottomSheetDialog().show(getSupportFragmentManager(), "dialog");
} }
} }
} }

View file

@ -13,6 +13,7 @@ import android.support.v4.app.DialogFragment;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager;
import android.support.v4.widget.Space;
import android.text.method.LinkMovementMethod; import android.text.method.LinkMovementMethod;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.MenuItem; import android.view.MenuItem;
@ -23,7 +24,6 @@ import android.widget.ImageButton;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.support.v4.widget.Space;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
@ -577,7 +577,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
GoToMapFragment fragment = new GoToMapFragment(); GoToMapFragment fragment = new GoToMapFragment();
fragment.regionCenter = region.getRegionCenter(); fragment.regionCenter = region.getRegionCenter();
fragment.regionName = region.getLocaleName(); fragment.regionName = region.getLocaleName();
fragment.show(getFragmentManager(), GoToMapFragment.TAG); fragment.show(getSupportFragmentManager(), GoToMapFragment.TAG);
} }
private void showDownloadWorldMapIfNeeded() { private void showDownloadWorldMapIfNeeded() {
@ -590,7 +590,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
SUGGESTED_TO_DOWNLOAD_BASEMAP = true; SUGGESTED_TO_DOWNLOAD_BASEMAP = true;
AskMapDownloadFragment fragment = new AskMapDownloadFragment(); AskMapDownloadFragment fragment = new AskMapDownloadFragment();
fragment.indexItem = worldMap; fragment.indexItem = worldMap;
fragment.show(getFragmentManager(), AskMapDownloadFragment.TAG); fragment.show(getSupportFragmentManager(), AskMapDownloadFragment.TAG);
} }
} }
@ -599,7 +599,7 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
final boolean externalExists = final boolean externalExists =
getMyApplication().getSettings().getSecondaryStorage() != null; getMyApplication().getSettings().getSecondaryStorage() != null;
if (firstTime && externalExists && DataStoragePlaceDialogFragment.isInterestedInFirstTime) { if (firstTime && externalExists && DataStoragePlaceDialogFragment.isInterestedInFirstTime) {
new DataStoragePlaceDialogFragment().show(getFragmentManager(), null); new DataStoragePlaceDialogFragment().show(getSupportFragmentManager(), null);
} }
} }
@ -762,7 +762,8 @@ public class DownloadActivity extends ActionBarProgressActivity implements Downl
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (savedInstanceState != null) { if (savedInstanceState != null) {
regionName = savedInstanceState.getString(KEY_GOTO_MAP_REGION_NAME, ""); regionName = savedInstanceState.getString(KEY_GOTO_MAP_REGION_NAME);
regionName = regionName == null ? "" : regionName;
Object rCenterObj = savedInstanceState.getSerializable(KEY_GOTO_MAP_REGION_CENTER); Object rCenterObj = savedInstanceState.getSerializable(KEY_GOTO_MAP_REGION_CENTER);
if (rCenterObj != null) { if (rCenterObj != null) {
regionCenter = (LatLon) rCenterObj; regionCenter = (LatLon) rCenterObj;