Add plugins preferences description
This commit is contained in:
parent
cdcb67b95c
commit
37cec1cc84
13 changed files with 26 additions and 124 deletions
|
@ -11,6 +11,10 @@
|
|||
Thx - Hardy
|
||||
|
||||
-->
|
||||
<string name="monitoring_prefs_descr">Navigation, logging accuracy</string>
|
||||
<string name="multimedia_notes_prefs_descr">Picture size, audio and video quality</string>
|
||||
<string name="osm_editing_prefs_descr">Login, password, offline editing</string>
|
||||
<string name="accessibility_prefs_descr">Choose icon, color and name</string>
|
||||
<string name="live_monitoring_descr">Allow you to share current location using trip recording.</string>
|
||||
<string name="live_monitoring">Online tracking</string>
|
||||
<string name="save_track_logging_accuracy">Logging accuracy</string>
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package net.osmand.access;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.media.AudioManager;
|
||||
import android.media.SoundPool;
|
||||
|
@ -12,10 +8,13 @@ import android.support.annotation.NonNull;
|
|||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.settings.AccessibilitySettingsFragment;
|
||||
import net.osmand.plus.settings.BaseSettingsFragment;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class AccessibilityPlugin extends OsmandPlugin {
|
||||
|
||||
public static final int DIRECTION_NOTIFICATION = 1;
|
||||
|
@ -30,7 +29,7 @@ public class AccessibilityPlugin extends OsmandPlugin {
|
|||
public AccessibilityPlugin(OsmandApplication app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean init(@NonNull final OsmandApplication app, Activity activity) {
|
||||
sounds = new SoundPool(1, AudioManager.STREAM_MUSIC, 0);
|
||||
|
@ -57,11 +56,6 @@ public class AccessibilityPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.shared_string_accessibility);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLayers(MapActivity activity) {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return SettingsAccessibilityActivity.class;
|
||||
|
@ -74,7 +68,7 @@ public class AccessibilityPlugin extends OsmandPlugin {
|
|||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
return app.getString(R.string.accessibility_prefs_descr);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -110,5 +104,4 @@ public class AccessibilityPlugin extends OsmandPlugin {
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -66,8 +66,6 @@ public abstract class OsmandPlugin {
|
|||
|
||||
public abstract String getDescription();
|
||||
|
||||
public abstract String getPrefsDescription();
|
||||
|
||||
public abstract int getAssetResourceName();
|
||||
|
||||
@DrawableRes
|
||||
|
@ -75,9 +73,17 @@ public abstract class OsmandPlugin {
|
|||
return R.drawable.ic_extension_dark;
|
||||
}
|
||||
|
||||
public abstract Class<? extends Activity> getSettingsActivity();
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public abstract Class<? extends BaseSettingsFragment> getSettingsFragment();
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return "";
|
||||
|
|
|
@ -1797,7 +1797,7 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
return app.getString(R.string.multimedia_notes_prefs_descr);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,7 +30,6 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
|
|||
//ApplicationMode.regWidgetVisibility("fps", new ApplicationMode[0]);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return ID;
|
||||
|
@ -126,16 +125,6 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
|
|||
return SettingsDevelopmentActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_plugin_developer;
|
||||
|
@ -150,4 +139,4 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
|
|||
public DashFragmentData getCardFragment() {
|
||||
return DashSimulateFragment.FRAGMENT_DATA;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -140,21 +140,6 @@ public class MapillaryPlugin extends OsmandPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerLayerContextMenuActions(final OsmandMapTileView mapView, ContextMenuAdapter adapter, final MapActivity mapActivity) {
|
||||
ContextMenuAdapter.ItemClickListener listener = new ContextMenuAdapter.OnRowItemClick() {
|
||||
|
|
|
@ -155,7 +155,7 @@ public class OsmandMonitoringPlugin extends OsmandPlugin {
|
|||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
return app.getString(R.string.monitoring_prefs_descr);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -121,19 +121,4 @@ public class NauticalMapsPlugin extends OsmandPlugin {
|
|||
public String getId() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -199,7 +199,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
return app.getString(R.string.osm_editing_prefs_descr);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -518,21 +518,6 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
parkingPlaceControl.setIcons(R.drawable.widget_parking_day, R.drawable.widget_parking_night);
|
||||
return parkingPlaceControl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
|
|
|
@ -407,21 +407,6 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return SettingsRasterMapsActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void installMapLayers(final Activity activity, final ResultMatcher<TileSourceTemplate> result) {
|
||||
final OsmandApplication app = (OsmandApplication) activity.getApplication();
|
||||
final OsmandSettings settings = app.getSettings();
|
||||
|
|
|
@ -89,19 +89,4 @@ public class SkiMapsPlugin extends OsmandPlugin {
|
|||
public String getId() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -420,21 +420,6 @@ public class SRTMPlugin extends OsmandPlugin {
|
|||
@Override
|
||||
public void disable(OsmandApplication app) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends BaseSettingsFragment> getSettingsFragment() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrefsDescription() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void refreshMapComplete(final MapActivity activity) {
|
||||
activity.getMyApplication().getResourceManager().getRenderer().clearCache();
|
||||
|
|
Loading…
Reference in a new issue