diff --git a/OsmAnd/res/values/no_translate.xml b/OsmAnd/res/values/no_translate.xml index 45350b64a6..16e1e36e45 100644 --- a/OsmAnd/res/values/no_translate.xml +++ b/OsmAnd/res/values/no_translate.xml @@ -7,6 +7,6 @@ 10 true +play_market +gps_status -parking_plugin -blackberry -free_version -amazon - - + + Here should be text about License, about third party GPL libraries, All rights belong to OsmAnd app.... diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 8441122e73..f1de55ac76 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -9,6 +9,10 @@ 3. All your modified/created strings are in the top of the file (to make easier find what\'s translated). PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy --> + Version : + About + About … + Tips Changes in 1.6: \n\t* Define/edit online tile source (specify expiration time) diff --git a/OsmAnd/res/xml/settings_pref.xml b/OsmAnd/res/xml/settings_pref.xml index c249c54358..0baaff5745 100644 --- a/OsmAnd/res/xml/settings_pref.xml +++ b/OsmAnd/res/xml/settings_pref.xml @@ -7,5 +7,4 @@ /> - diff --git a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java index 47c2d9e75b..7e74b2d08d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java +++ b/OsmAnd/src/net/osmand/plus/activities/MapActivityActions.java @@ -1251,6 +1251,17 @@ public class MapActivityActions implements DialogProvider { } }).reg(); } + optionsMenuHelper.item(R.string.tips_and_tricks). + icons(R.drawable.ic_action_ghelp_dark, R.drawable.ic_action_ghelp_light). + listen(new OnContextMenuClick() { + + @Override + public void onContextMenuClick(int itemId, int pos, boolean isChecked, DialogInterface dialog) { + TipsAndTricksActivity tactivity = new TipsAndTricksActivity(mapActivity); + Dialog dlg = tactivity.getDialogToShowTips(false, true); + dlg.show(); + } + }).reg(); final OsmAndLocationProvider loc = app.getLocationProvider(); if (app.getTargetPointsHelper().getPointToNavigate() != null) { diff --git a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java index 6052c3abf8..1cd2550606 100644 --- a/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/SettingsActivity.java @@ -2,14 +2,31 @@ package net.osmand.plus.activities; import java.io.File; +import java.util.Date; import net.osmand.IndexConstants; +import net.osmand.plus.OsmandApplication; import net.osmand.plus.OsmandPlugin; import net.osmand.plus.R; +import net.osmand.plus.Version; +import net.osmand.plus.rastermaps.SettingsRasterMapsActivity; +import net.osmand.util.Algorithms; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; import android.content.Intent; +import android.content.pm.ApplicationInfo; +import android.content.pm.PackageManager; import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceScreen; +import android.preference.Preference.OnPreferenceClickListener; +import android.text.SpannableString; +import android.text.format.DateFormat; +import android.text.method.LinkMovementMethod; +import android.text.style.ClickableSpan; +import android.util.TypedValue; +import android.view.View; +import android.widget.TextView; public class SettingsActivity extends SettingsBaseActivity { @@ -25,6 +42,7 @@ public class SettingsActivity extends SettingsBaseActivity { private Preference localIndexes; private Preference general; private Preference routing; + private Preference about; @Override public void onCreate(Bundle savedInstanceState) { @@ -52,6 +70,12 @@ public class SettingsActivity extends SettingsBaseActivity { startActivity(new Intent(this, SettingsNavigationActivity.class)); } } + about = new Preference(this); + about.setOnPreferenceClickListener(this); + about.setSummary(R.string.about_settings_descr); + about.setTitle(R.string.about_settings); + about.setKey("about"); + screen.addPreference(about); } @Override @@ -88,6 +112,9 @@ public class SettingsActivity extends SettingsBaseActivity { } else if (preference == routing) { startActivity(new Intent(this, SettingsNavigationActivity.class)); return true; + } else if (preference == about) { + showAboutDialog(); + return true; } else if (preference == plugins) { startActivityForResult(new Intent(this, OsmandIntents.getPluginsActivity()), PLUGINS_SELECTION_REQUEST); return true; @@ -97,4 +124,40 @@ public class SettingsActivity extends SettingsBaseActivity { return false; } + private void showAboutDialog() { + Builder bld = new AlertDialog.Builder(this); + bld.setTitle(R.string.about_settings); + TextView tv = new TextView(this); + String version = Version.getFullVersion(getMyApplication()); + String vt = getString(R.string.about_version) +"\t"; + int st = vt.length(); + String edition = ""; + try { + PackageManager pm = getPackageManager(); + ApplicationInfo appInfo = pm.getApplicationInfo(OsmandApplication.class.getPackage().getName(), 0); + Date date = new Date(new File(appInfo.sourceDir).lastModified()); + edition = getString(R.string.local_index_installed) +" :\t" + DateFormat.getDateFormat(getApplicationContext()).format(date); + } catch(Exception e) { + } + SpannableString content = new SpannableString(vt + version +"\n" + + edition +"\n\n"+ + getString(R.string.about_content)); + content.setSpan(new ClickableSpan() { + @Override + public void onClick(View widget) { + final Intent mapIntent = new Intent(SettingsActivity.this, ContributionVersionActivity.class); + startActivityForResult(mapIntent, 0); + } + + }, st, st + version.length(), 0); + tv.setText(content); + tv.setPadding(5, 0, 5, 5); + tv.setTextSize(TypedValue.COMPLEX_UNIT_SP, 19); + tv.setMovementMethod(LinkMovementMethod.getInstance()); + bld.setView(tv); + bld.setPositiveButton(R.string.default_buttons_ok, null); + bld.show(); + + } + }