diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index acb82e4eab..80dc11fd3a 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -2257,4 +2257,6 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A Number of rows in dash %1$s Please specify POI type. Working days + Recent places + Favourites diff --git a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java index fb25d0694f..d22e27395e 100644 --- a/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java +++ b/OsmAnd/src/net/osmand/plus/audionotes/AudioVideoNotesPlugin.java @@ -1,51 +1,5 @@ package net.osmand.plus.audionotes; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.util.Arrays; -import java.util.Collection; -import java.util.Comparator; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import net.osmand.AndroidUtils; -import net.osmand.IProgress; -import net.osmand.IndexConstants; -import net.osmand.Location; -import net.osmand.PlatformUtil; -import net.osmand.access.AccessibleAlertBuilder; -import net.osmand.access.AccessibleToast; -import net.osmand.data.DataTileManager; -import net.osmand.data.PointDescription; -import net.osmand.plus.ApplicationMode; -import net.osmand.plus.ContextMenuAdapter; -import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; -import net.osmand.plus.OsmandApplication; -import net.osmand.plus.OsmandPlugin; -import net.osmand.plus.OsmandSettings; -import net.osmand.plus.OsmandSettings.CommonPreference; -import net.osmand.plus.OsmandSettings.OsmandPreference; -import net.osmand.plus.R; -import net.osmand.plus.activities.MapActivity; -import net.osmand.plus.activities.SavingTrackHelper; -import net.osmand.plus.activities.TabActivity.TabItem; -import net.osmand.plus.dashboard.tools.DashFragmentData; -import net.osmand.plus.monitoring.OsmandMonitoringPlugin; -import net.osmand.plus.myplaces.FavoritesActivity; -import net.osmand.plus.views.MapInfoLayer; -import net.osmand.plus.views.OsmandMapTileView; -import net.osmand.plus.views.mapwidgets.TextInfoWidget; -import net.osmand.util.Algorithms; -import net.osmand.util.GeoPointParserUtil.GeoParsedPoint; -import net.osmand.util.MapUtils; - -import org.apache.commons.logging.Log; - import android.app.Activity; import android.app.Dialog; import android.content.ComponentName; @@ -81,6 +35,52 @@ import android.widget.ArrayAdapter; import android.widget.ImageView; import android.widget.Toast; +import net.osmand.AndroidUtils; +import net.osmand.IProgress; +import net.osmand.IndexConstants; +import net.osmand.Location; +import net.osmand.PlatformUtil; +import net.osmand.access.AccessibleAlertBuilder; +import net.osmand.access.AccessibleToast; +import net.osmand.data.DataTileManager; +import net.osmand.data.PointDescription; +import net.osmand.plus.ApplicationMode; +import net.osmand.plus.ContextMenuAdapter; +import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick; +import net.osmand.plus.OsmandApplication; +import net.osmand.plus.OsmandPlugin; +import net.osmand.plus.OsmandSettings; +import net.osmand.plus.OsmandSettings.CommonPreference; +import net.osmand.plus.OsmandSettings.OsmandPreference; +import net.osmand.plus.R; +import net.osmand.plus.activities.MapActivity; +import net.osmand.plus.activities.SavingTrackHelper; +import net.osmand.plus.activities.TabActivity.TabItem; +import net.osmand.plus.dashboard.tools.DashFragmentData; +import net.osmand.plus.monitoring.OsmandMonitoringPlugin; +import net.osmand.plus.myplaces.FavoritesActivity; +import net.osmand.plus.views.MapInfoLayer; +import net.osmand.plus.views.OsmandMapTileView; +import net.osmand.plus.views.mapwidgets.TextInfoWidget; +import net.osmand.util.Algorithms; +import net.osmand.util.GeoPointParserUtil.GeoParsedPoint; +import net.osmand.util.MapUtils; + +import org.apache.commons.logging.Log; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Collection; +import java.util.Comparator; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + public class AudioVideoNotesPlugin extends OsmandPlugin { @@ -1303,6 +1303,6 @@ public class AudioVideoNotesPlugin extends OsmandPlugin { @Override public DashFragmentData getCardFragment() { return new DashFragmentData(DashAudioVideoNotesFragment.TAG, - DashAudioVideoNotesFragment.class, getName(), 10); + DashAudioVideoNotesFragment.class, R.string.audionotes_plugin_name, 10); } } diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index d4993568de..ad13363af0 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -92,11 +92,11 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks { new DashFragmentData(DashSearchFragment.TAG, DashSearchFragment.class, R.string.shared_string_search, 7), new DashFragmentData(DashRecentsFragment.TAG, DashRecentsFragment.class, - "Recent places", 8), + R.string.recent_places, 8), new DashFragmentData(DashFavoritesFragment.TAG, DashFavoritesFragment.class, - "Favourites", defaultShouldShow, false, 9, DashFavoritesFragment.ROW_NUMBER_TAG), + R.string.favourites, defaultShouldShow, false, 9, DashFavoritesFragment.ROW_NUMBER_TAG), new DashFragmentData(DashPluginsFragment.TAG, DashPluginsFragment.class, - "Plugins", 14) + R.string.plugin_settings, 14) }; private MapActivity mapActivity; diff --git a/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java b/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java index 801c9127b1..9c5268de2c 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/tools/DashboardSettingsDialogFragment.java @@ -229,7 +229,7 @@ public class DashboardSettingsDialogFragment extends DialogFragment { viewHolder.position = position; viewHolder.compoundButton.setTag(viewHolder); viewHolder.compoundButton.setChecked(checkedItems[position]); - viewHolder.textView.setText(dashFragmentData.title); + viewHolder.textView.setText(dashFragmentData.titleStringId); viewHolder.textView.setTextColor(checkedItems[position] ? textColorPrimary : textColorSecondary); convertView.setTag(viewHolder); diff --git a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java index d657bb0f77..d28efee678 100644 --- a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java +++ b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java @@ -130,7 +130,7 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin { public DashFragmentData getCardFragment() { return new DashFragmentData(DashSimulateFragment.TAG, DashSimulateFragment.class, - getName(), + R.string.debugging_and_development, new DashboardOnMap.DefaultShouldShow(), 15); } } diff --git a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java index 43dc0513b0..11cce0287a 100644 --- a/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java +++ b/OsmAnd/src/net/osmand/plus/development/TestVoiceActivity.java @@ -1,11 +1,22 @@ package net.osmand.plus.development; -import java.io.File; -import java.util.LinkedHashSet; -import java.util.Set; - +import android.app.ActionBar; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; +import android.content.DialogInterface; +import android.content.pm.ActivityInfo; import android.os.Build; +import android.os.Bundle; import android.view.MenuItem; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; +import android.widget.LinearLayout; +import android.widget.LinearLayout.LayoutParams; +import android.widget.ScrollView; +import android.widget.TextView; +import android.widget.Toast; + import net.osmand.IndexConstants; import net.osmand.access.AccessibleToast; import net.osmand.plus.OsmandApplication; @@ -15,22 +26,13 @@ import net.osmand.plus.voice.AbstractPrologCommandPlayer; import net.osmand.plus.voice.CommandBuilder; import net.osmand.plus.voice.CommandPlayer; import net.osmand.util.Algorithms; + +import java.io.File; +import java.util.LinkedHashSet; +import java.util.Set; + import alice.tuprolog.Struct; import alice.tuprolog.Term; -import android.app.ActionBar; -import android.app.AlertDialog; -import android.app.AlertDialog.Builder; -import android.content.DialogInterface; -import android.content.pm.ActivityInfo; -import android.os.Bundle; -import android.view.View; -import android.view.ViewGroup; -import android.widget.Button; -import android.widget.LinearLayout; -import android.widget.LinearLayout.LayoutParams; -import android.widget.ScrollView; -import android.widget.TextView; -import android.widget.Toast; /** @@ -170,7 +172,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity { addButton(ll, "Route recalculated (23150m & 350sec)", builder(p).routeRecalculated(23150, 350)); addButton(ll, "In 1520m turn slightly left", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_LEFT_SL, 1520, street(p, ""))); - addButton(ll, "After 850m turn sharply left onto 'Hauptstra"+"\u00df"+"e', then bear right", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT_SH, 850, street(p, "Hauptstraße")).then().bearRight(street(p, ""))); + addButton(ll, "After 850m turn sharply left onto 'Hauptstra"+"\u00df"+"e', then bear right", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT_SH, 850, street(p, "Hauptstrasse")).then().bearRight(street(p, ""))); addButton(ll, "Turn left, then after 100m turn slightly right", builder(p).turn(AbstractPrologCommandPlayer.A_LEFT, street(p, "")).then().turn(AbstractPrologCommandPlayer.A_RIGHT_SL, 100, street(p, ""))); addButton(ll, "In 3100 turn right onto 'SR 80'", builder(p).prepareTurn(AbstractPrologCommandPlayer.A_RIGHT, 3100, street(p, "SR 80"))); addButton(ll, "After 370m turn slightly right onto 'F23' 'Main Street', then bear left", builder(p).turn(AbstractPrologCommandPlayer.A_RIGHT_SL, 370, street(p, "Main Street", "F23")).then().bearLeft(street(p, ""))); diff --git a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java index e99e5ee551..635fc44b49 100644 --- a/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java +++ b/OsmAnd/src/net/osmand/plus/monitoring/OsmandMonitoringPlugin.java @@ -1,8 +1,23 @@ package net.osmand.plus.monitoring; -import gnu.trove.list.array.TIntArrayList; - -import java.util.List; +import android.app.Activity; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; +import android.content.Context; +import android.content.DialogInterface; +import android.content.DialogInterface.OnClickListener; +import android.util.DisplayMetrics; +import android.view.View; +import android.view.WindowManager; +import android.widget.ArrayAdapter; +import android.widget.CheckBox; +import android.widget.CompoundButton; +import android.widget.CompoundButton.OnCheckedChangeListener; +import android.widget.LinearLayout; +import android.widget.LinearLayout.LayoutParams; +import android.widget.SeekBar; +import android.widget.SeekBar.OnSeekBarChangeListener; +import android.widget.TextView; import net.osmand.Location; import net.osmand.ValueHolder; @@ -23,24 +38,10 @@ import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.OsmandMapLayer.DrawSettings; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.mapwidgets.TextInfoWidget; -import android.app.Activity; -import android.app.AlertDialog; -import android.app.AlertDialog.Builder; -import android.content.Context; -import android.content.DialogInterface; -import android.content.DialogInterface.OnClickListener; -import android.util.DisplayMetrics; -import android.view.View; -import android.view.WindowManager; -import android.widget.ArrayAdapter; -import android.widget.CheckBox; -import android.widget.CompoundButton; -import android.widget.CompoundButton.OnCheckedChangeListener; -import android.widget.LinearLayout; -import android.widget.LinearLayout.LayoutParams; -import android.widget.SeekBar; -import android.widget.SeekBar.OnSeekBarChangeListener; -import android.widget.TextView; + +import java.util.List; + +import gnu.trove.list.array.TIntArrayList; public class OsmandMonitoringPlugin extends OsmandPlugin { private static final String ID = "osmand.monitoring"; @@ -465,6 +466,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin { @Override public DashFragmentData getCardFragment() { - return new DashFragmentData(DashTrackFragment.TAG, DashTrackFragment.class, getName(), 11); + return new DashFragmentData(DashTrackFragment.TAG, DashTrackFragment.class, + R.string.record_plugin_name, 11); } } \ No newline at end of file diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 7ac168803b..a53ae43bd4 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -348,6 +348,7 @@ public class OsmEditingPlugin extends OsmandPlugin { @Override public DashFragmentData getCardFragment() { - return new DashFragmentData(DashOsmEditsFragment.TAG, DashOsmEditsFragment.class, getName(), 13); + return new DashFragmentData(DashOsmEditsFragment.TAG, DashOsmEditsFragment.class, + R.string.osm_settings, 13); } } diff --git a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java index e4836f94b4..3fb624d57b 100644 --- a/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmo/OsMoPlugin.java @@ -1,12 +1,10 @@ package net.osmand.plus.osmo; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.util.Arrays; +import android.app.Activity; +import android.content.Intent; +import android.os.AsyncTask; +import android.view.View; +import android.widget.ArrayAdapter; import net.osmand.IndexConstants; import net.osmand.Location; @@ -38,11 +36,13 @@ import org.apache.commons.logging.Log; import org.json.JSONException; import org.json.JSONObject; -import android.app.Activity; -import android.content.Intent; -import android.os.AsyncTask; -import android.view.View; -import android.widget.ArrayAdapter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.Arrays; public class OsMoPlugin extends OsmandPlugin implements OsMoReactor { @@ -533,6 +533,7 @@ public class OsMoPlugin extends OsmandPlugin implements OsMoReactor { @Override public DashFragmentData getCardFragment() { - return new DashFragmentData(DashOsMoFragment.TAG, DashOsMoFragment.class, getName(), 12); + return new DashFragmentData(DashOsMoFragment.TAG, DashOsMoFragment.class, + R.string.osmo_plugin_name, 12); } } diff --git a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java index 76233c36ae..f40cd4a4ae 100644 --- a/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java +++ b/OsmAnd/src/net/osmand/plus/parkingpoint/ParkingPositionPlugin.java @@ -1,7 +1,20 @@ package net.osmand.plus.parkingpoint; -import java.util.Calendar; +import android.app.Activity; +import android.app.AlertDialog; +import android.app.AlertDialog.Builder; +import android.app.Dialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.text.format.DateFormat; +import android.text.format.Time; +import android.view.View; +import android.widget.ArrayAdapter; +import android.widget.CheckBox; +import android.widget.ImageButton; +import android.widget.TextView; +import android.widget.TimePicker; import net.osmand.data.LatLon; import net.osmand.plus.ApplicationMode; @@ -20,20 +33,8 @@ import net.osmand.plus.views.MapInfoLayer; import net.osmand.plus.views.OsmandMapLayer.DrawSettings; import net.osmand.plus.views.OsmandMapTileView; import net.osmand.plus.views.mapwidgets.TextInfoWidget; -import android.app.Activity; -import android.app.AlertDialog; -import android.app.AlertDialog.Builder; -import android.app.Dialog; -import android.content.DialogInterface; -import android.content.Intent; -import android.text.format.DateFormat; -import android.text.format.Time; -import android.view.View; -import android.widget.ArrayAdapter; -import android.widget.CheckBox; -import android.widget.ImageButton; -import android.widget.TextView; -import android.widget.TimePicker; + +import java.util.Calendar; /** * @@ -563,6 +564,7 @@ public class ParkingPositionPlugin extends OsmandPlugin { @Override public DashFragmentData getCardFragment() { - return new DashFragmentData(DashParkingFragment.TAG, DashParkingFragment.class, getName(), 5); + return new DashFragmentData(DashParkingFragment.TAG, DashParkingFragment.class, + R.string.osmand_parking_plugin_name, 5); } }