Add webp screenshots
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 99 KiB After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 114 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
@ -13,11 +13,13 @@
|
|||
tools:context=".activities.PluginActivity">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/plugin_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxHeight="144dp"
|
||||
android:maxWidth="360dp"
|
||||
android:scaleType="centerInside"
|
||||
android:adjustViewBounds= "true"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/extension_stub"/>
|
||||
|
||||
|
|
|
@ -47,4 +47,14 @@ public class AccessibilityPlugin extends OsmandPlugin {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,8 @@ public abstract class OsmandPlugin {
|
|||
public abstract String getDescription();
|
||||
|
||||
public abstract String getName();
|
||||
|
||||
public abstract int getAssetResourceName();
|
||||
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_extension_dark;
|
||||
|
@ -93,14 +95,14 @@ public abstract class OsmandPlugin {
|
|||
|
||||
public static void initPlugins(OsmandApplication app) {
|
||||
OsmandSettings settings = app.getSettings();
|
||||
OsmandRasterMapsPlugin rasterMapsPlugin = new OsmandRasterMapsPlugin(app);
|
||||
Set<String> enabledPlugins = settings.getEnabledPlugins();
|
||||
allPlugins.add(rasterMapsPlugin);
|
||||
allPlugins.add(new OsmandRasterMapsPlugin(app));
|
||||
allPlugins.add(new OsmandMonitoringPlugin(app));
|
||||
allPlugins.add(new OsMoPlugin(app));
|
||||
checkMarketPlugin(app, new SRTMPlugin(app), true, SRTM_PLUGIN_COMPONENT_PAID, SRTM_PLUGIN_COMPONENT);
|
||||
|
||||
checkMarketPlugin(app, new TouringViewPlugin(app), false, TouringViewPlugin.COMPONENT, null);
|
||||
// ? questionable - definitely not market plugin
|
||||
// checkMarketPlugin(app, new TouringViewPlugin(app), false, TouringViewPlugin.COMPONENT, null);
|
||||
checkMarketPlugin(app, new NauticalMapsPlugin(app), false, NauticalMapsPlugin.COMPONENT, null);
|
||||
checkMarketPlugin(app, new SkiMapsPlugin(app), false, SkiMapsPlugin.COMPONENT, null);
|
||||
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
package net.osmand.plus.activities;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
import net.osmand.plus.R;
|
||||
|
||||
/**
|
||||
* Created by Alexey Pelykh on 02.02.2015.
|
||||
*/
|
||||
|
@ -55,6 +56,10 @@ public class PluginActivity extends OsmandActionBarActivity {
|
|||
|
||||
setContentView(R.layout.plugin);
|
||||
getSupportActionBar().setTitle(plugin.getName());
|
||||
if(plugin.getAssetResourceName() != 0 && Build.VERSION.SDK_INT >= 14) {
|
||||
ImageView img = (ImageView) findViewById(R.id.plugin_image);
|
||||
img.setImageResource(plugin.getAssetResourceName());
|
||||
}
|
||||
|
||||
TextView descriptionView = (TextView)findViewById(R.id.plugin_description);
|
||||
descriptionView.setText(plugin.getDescription());
|
||||
|
|
|
@ -21,7 +21,6 @@ import net.osmand.PlatformUtil;
|
|||
import net.osmand.access.AccessibleAlertBuilder;
|
||||
import net.osmand.access.AccessibleToast;
|
||||
import net.osmand.data.DataTileManager;
|
||||
import net.osmand.data.Street;
|
||||
import net.osmand.plus.ApplicationMode;
|
||||
import net.osmand.plus.ContextMenuAdapter;
|
||||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
|
@ -68,7 +67,6 @@ import android.media.MediaRecorder;
|
|||
import android.media.SoundPool;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.view.Display;
|
||||
import android.view.KeyEvent;
|
||||
|
@ -1243,7 +1241,15 @@ public class AudioVideoNotesPlugin extends OsmandPlugin {
|
|||
camera.release();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_type_video;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.audio_video_notes;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,5 +75,16 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
|
|||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return SettingsDevelopmentActivity.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.osmand_development;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -653,4 +653,13 @@ public class DistanceCalculatorPlugin extends OsmandPlugin {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.distance_calculator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_action_marker_dark;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,6 @@ import net.osmand.plus.ContextMenuAdapter;
|
|||
import net.osmand.plus.ContextMenuAdapter.OnContextMenuClick;
|
||||
import net.osmand.plus.NavigationService;
|
||||
import net.osmand.plus.OsmAndFormatter;
|
||||
import net.osmand.plus.OsmAndTaskManager;
|
||||
import net.osmand.plus.OsmAndTaskManager.OsmAndTaskRunnable;
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
import net.osmand.plus.OsmandPlugin;
|
||||
|
@ -18,7 +17,6 @@ import net.osmand.plus.OsmandSettings;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SavingTrackHelper;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.plus.views.MapInfoLayer;
|
||||
import net.osmand.plus.views.MonitoringInfoControl;
|
||||
import net.osmand.plus.views.MonitoringInfoControl.MonitoringInfoControlServices;
|
||||
|
@ -36,11 +34,7 @@ import android.content.DialogInterface.OnClickListener;
|
|||
import android.content.Intent;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Display;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
@ -48,8 +42,8 @@ import android.widget.CheckBox;
|
|||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
@ -73,6 +67,17 @@ public class OsmandMonitoringPlugin extends OsmandPlugin implements MonitoringIn
|
|||
public void updateLocation(Location location) {
|
||||
liveMonitoringHelper.updateLocation(location);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.trip_recording;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean init(OsmandApplication app, Activity activity) {
|
||||
|
|
|
@ -24,6 +24,17 @@ public class NauticalMapsPlugin extends OsmandPlugin {
|
|||
public NauticalMapsPlugin(OsmandApplication app) {
|
||||
this.app = app;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.nautical_map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
|
|
|
@ -260,4 +260,13 @@ public class OsmEditingPlugin extends OsmandPlugin {
|
|||
return app.getString(R.string.osm_settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_action_bug_dark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.osm_editing;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,6 @@ import net.osmand.plus.OsmandPlugin;
|
|||
import net.osmand.plus.R;
|
||||
import net.osmand.plus.TargetPointsHelper;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.plus.download.DownloadFileHelper;
|
||||
import net.osmand.plus.osmo.OsMoGroupsStorage.OsMoDevice;
|
||||
import net.osmand.plus.osmo.OsMoService.SessionInfo;
|
||||
|
@ -46,9 +45,6 @@ import android.content.Intent;
|
|||
import android.graphics.Paint;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.AsyncTask;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
|
@ -70,7 +66,11 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
|
|||
|
||||
public OsMoPlugin(final OsmandApplication app) {
|
||||
this.app = app;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.osmo_monitoring;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -514,4 +514,14 @@ public class ParkingPositionPlugin extends OsmandPlugin {
|
|||
public Class<? extends Activity> getSettingsActivity() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.parking_position;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_action_parking_dark;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import net.osmand.plus.Version;
|
|||
import net.osmand.plus.activities.DownloadTilesDialog;
|
||||
import net.osmand.plus.activities.MapActivity;
|
||||
import net.osmand.plus.activities.MapActivityLayers;
|
||||
import net.osmand.plus.activities.SettingsActivity;
|
||||
import net.osmand.plus.views.MapTileLayer;
|
||||
import net.osmand.plus.views.OsmandMapTileView;
|
||||
import net.osmand.util.Algorithms;
|
||||
|
@ -31,11 +30,7 @@ import android.app.Activity;
|
|||
import android.app.AlertDialog;
|
||||
import android.app.AlertDialog.Builder;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.AsyncTask;
|
||||
import android.preference.Preference;
|
||||
import android.preference.Preference.OnPreferenceClickListener;
|
||||
import android.preference.PreferenceScreen;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.OnItemSelectedListener;
|
||||
|
@ -63,6 +58,16 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
return R.drawable.ic_world_globe_dark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.online_maps;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return ID;
|
||||
|
|
|
@ -66,6 +66,17 @@ public class RoutePointsPlugin extends OsmandPlugin {
|
|||
public SelectedRouteGpxFile getCurrentRoute() {
|
||||
return currentRoute;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.trip_recording;
|
||||
}
|
||||
|
||||
public void setCurrentRoute(GPXFile gpx) {
|
||||
if (gpx == null) {
|
||||
|
|
|
@ -26,6 +26,18 @@ public class SkiMapsPlugin extends OsmandPlugin {
|
|||
public String getName() {
|
||||
return app.getString(net.osmand.plus.R.string.plugin_ski_name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.ski_map;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean init(final OsmandApplication app, final Activity activity) {
|
||||
if(activity != null) {
|
||||
|
|
|
@ -31,6 +31,17 @@ public class SRTMPlugin extends OsmandPlugin {
|
|||
this.app = app;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLogoResourceId() {
|
||||
// TODO
|
||||
return super.getLogoResourceId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.contour_lines;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
|
|
|
@ -21,6 +21,11 @@ public class TouringViewPlugin extends OsmandPlugin {
|
|||
public String getDescription() {
|
||||
return app.getString(net.osmand.plus.R.string.plugin_touringview_descr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAssetResourceName() {
|
||||
return R.drawable.touring_map_view;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
|
|