add description for all choose plan dialogs

This commit is contained in:
Chumva 2018-05-22 15:17:28 +03:00
parent e3cd85da67
commit f067ee0228
3 changed files with 26 additions and 3 deletions

View file

@ -4,7 +4,9 @@ import android.app.Activity;
import android.view.View; import android.view.View;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.Version;
import net.osmand.plus.activities.OsmandInAppPurchaseActivity; import net.osmand.plus.activities.OsmandInAppPurchaseActivity;
import net.osmand.plus.download.DownloadValidationManager;
import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.inapp.InAppPurchaseHelper;
public class ChoosePlanHillshadeSrtmDialogFragment extends ChoosePlanDialogFragment { public class ChoosePlanHillshadeSrtmDialogFragment extends ChoosePlanDialogFragment {
@ -52,7 +54,12 @@ public class ChoosePlanHillshadeSrtmDialogFragment extends ChoosePlanDialogFragm
@Override @Override
public String getInfoDescription() { public String getInfoDescription() {
return ""; if (Version.isFreeVersion(getOsmandApplication())) {
return getString(R.string.free_version_message,
DownloadValidationManager.MAXIMUM_AVAILABLE_FREE_DOWNLOADS) + "\n" + getString(R.string.get_osmand_live);
} else {
return getString(R.string.get_osmand_live);
}
} }
@Override @Override

View file

@ -4,7 +4,9 @@ import android.app.Activity;
import android.view.View; import android.view.View;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.Version;
import net.osmand.plus.activities.OsmandInAppPurchaseActivity; import net.osmand.plus.activities.OsmandInAppPurchaseActivity;
import net.osmand.plus.download.DownloadValidationManager;
import net.osmand.plus.inapp.InAppPurchaseHelper; import net.osmand.plus.inapp.InAppPurchaseHelper;
public class ChoosePlanSeaDepthMapsDialogFragment extends ChoosePlanDialogFragment { public class ChoosePlanSeaDepthMapsDialogFragment extends ChoosePlanDialogFragment {
@ -52,7 +54,12 @@ public class ChoosePlanSeaDepthMapsDialogFragment extends ChoosePlanDialogFragme
@Override @Override
public String getInfoDescription() { public String getInfoDescription() {
return ""; if (Version.isFreeVersion(getOsmandApplication())) {
return getString(R.string.free_version_message,
DownloadValidationManager.MAXIMUM_AVAILABLE_FREE_DOWNLOADS) + "\n" + getString(R.string.get_osmand_live);
} else {
return getString(R.string.get_osmand_live);
}
} }
@Override @Override

View file

@ -1,5 +1,9 @@
package net.osmand.plus.chooseplan; package net.osmand.plus.chooseplan;
import net.osmand.plus.R;
import net.osmand.plus.Version;
import net.osmand.plus.download.DownloadValidationManager;
public class ChoosePlanWikipediaDialogFragment extends ChoosePlanFreeBannerDialogFragment { public class ChoosePlanWikipediaDialogFragment extends ChoosePlanFreeBannerDialogFragment {
public static final String TAG = ChoosePlanWikipediaDialogFragment.class.getSimpleName(); public static final String TAG = ChoosePlanWikipediaDialogFragment.class.getSimpleName();
@ -48,6 +52,11 @@ public class ChoosePlanWikipediaDialogFragment extends ChoosePlanFreeBannerDialo
@Override @Override
public String getInfoDescription() { public String getInfoDescription() {
return ""; if (Version.isFreeVersion(getOsmandApplication())) {
return getString(R.string.free_version_message,
DownloadValidationManager.MAXIMUM_AVAILABLE_FREE_DOWNLOADS) + "\n" + getString(R.string.get_osmand_live);
} else {
return getString(R.string.get_osmand_live);
}
} }
} }