From 85013045ca505096064aaf45c312b158d0263d2a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 May 2015 01:05:18 -0700 Subject: altosdroid: Add map types and map preloading UIs This adds an ugly dialog to select which maps to preload, and also adds the ability to display other map types. Signed-off-by: Keith Packard --- .../altusmetrum/AltosDroid/PreloadMapActivity.java | 322 +++++++++++++++++++++ 1 file changed, 322 insertions(+) create mode 100644 altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java') diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java b/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java new file mode 100644 index 00000000..2febaf29 --- /dev/null +++ b/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java @@ -0,0 +1,322 @@ +/* + * Copyright © 2015 Keith Packard + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.AltosDroid; + +import java.util.*; +import java.io.*; +import java.text.*; + +import org.altusmetrum.AltosDroid.R; + +import android.app.Activity; +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDevice; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.content.IntentFilter; +import android.os.Bundle; +import android.view.View; +import android.view.Window; +import android.view.View.OnClickListener; +import android.widget.*; +import android.widget.AdapterView.*; + +import org.altusmetrum.altoslib_7.*; + +/** + * This Activity appears as a dialog. It lists any paired devices and + * devices detected in the area after discovery. When a device is chosen + * by the user, the MAC address of the device is sent back to the parent + * Activity in the result Intent. + */ +public class PreloadMapActivity extends Activity implements AltosLaunchSiteListener, AltosMapInterface, AltosMapLoaderListener { + + private ArrayAdapter known_sites_adapter; + + private CheckBox hybrid; + private CheckBox satellite; + private CheckBox roadmap; + private CheckBox terrain; + + private Spinner min_zoom; + private Spinner max_zoom; + private Spinner tile_radius; + + private EditText latitude; + private EditText longitude; + + private ProgressBar progress; + + /* AltosMapLoaderListener interfaces */ + public void loader_start(final int max) { + AltosDebug.debug("loader_start max %d\n", max); + this.runOnUiThread(new Runnable() { + public void run() { + progress.setMax(max); + progress.setProgress(0); + } + }); + } + + public void loader_notify(final int cur, final int max, final String name) { + AltosDebug.debug("loader_notify cur %4d max %4d %s\n", cur, max, name); + this.runOnUiThread(new Runnable() { + public void run() { + progress.setProgress(cur); + } + }); + } + + public void loader_done(int max) { + AltosDebug.debug("loader_done max %d\n", max); + this.runOnUiThread(new Runnable() { + public void run() { + progress.setProgress(0); + finish(); + } + }); + } + + /* AltosLaunchSiteListener interface */ + public void notify_launch_sites(final List sites) { + this.runOnUiThread(new Runnable() { + public void run() { + for (AltosLaunchSite site : sites) + known_sites_adapter.add(site); + } + }); + } + + AltosMap map; + AltosMapLoader loader; + + class PreloadMapImage implements AltosImage { + public void flush() { + } + + public PreloadMapImage(File file) { + AltosDebug.debug("preload file %s\n", file.toString()); + } + } + + public AltosMapPath new_path() { + return null; + } + + public AltosMapLine new_line() { + return null; + } + + public AltosImage load_image(File file) throws Exception { + return new PreloadMapImage(file); + } + + public AltosMapMark new_mark(double lat, double lon, int state) { + return null; + } + + class PreloadMapTile extends AltosMapTile { + public void paint(AltosMapTransform t) { + } + + public PreloadMapTile(AltosMapTileListener listener, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) { + super(listener, upper_left, center, zoom, maptype, px_size, 2); + } + + } + + public AltosMapTile new_tile(AltosMapTileListener listener, AltosLatLon upper_left, AltosLatLon center, int zoom, int maptype, int px_size) { + return new PreloadMapTile(listener, upper_left, center, zoom, maptype, px_size); + } + + public int width() { + return AltosMap.px_size; + } + + public int height() { + return AltosMap.px_size; + } + + public void repaint() { + } + + public void repaint(AltosRectangle damage) { + } + + public void set_zoom_label(String label) { + AltosDebug.debug("zoom label %s\n", label); + } + + private double text(EditText view) throws ParseException { + return AltosParse.parse_double_locale(view.getEditableText().toString()); + } + + private double latitude() throws ParseException { + return text(latitude); + } + + private double longitude() throws ParseException { + return text(longitude); + } + + private int value(Spinner spinner) { + return (Integer) spinner.getSelectedItem(); + } + + private int min_z() { + return value(min_zoom); + } + + private int max_z() { + return value(max_zoom); + } + + private int radius() { + return value(tile_radius); + } + + private int bit(CheckBox box, int value) { + if (box.isChecked()) + return 1 << value; + return 0; + } + + private int types() { + return (bit(hybrid, AltosMap.maptype_hybrid) | + bit(satellite, AltosMap.maptype_satellite) | + bit(roadmap, AltosMap.maptype_roadmap) | + bit(terrain, AltosMap.maptype_terrain)); + } + + private void load() { + try { + double lat = latitude(); + double lon = longitude(); + int min = min_z(); + int max = max_z(); + int r = radius(); + int t = types(); + + AltosDebug.debug("load lat %12.6f lon %12.6f min %d max %d r %d types %x\n", + lat, lon, min, max, r, t); + loader.load(lat, lon, min, max, r, t); + } catch (ParseException e) { + } + } + + private void add_numbers(Spinner spinner, int min, int max, int def) { + + ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item); + + int spinner_def = 0; + int pos = 0; + + for (int i = min; i <= max; i++) { + adapter.add(new Integer(i)); + if (i == def) + spinner_def = pos; + pos++; + } + + spinner.setAdapter(adapter); + spinner.setSelection(spinner_def); + } + + class SiteListListener implements OnItemSelectedListener { + public void onItemSelected(AdapterView parent, View view, int pos, long id) { + AltosLaunchSite site = (AltosLaunchSite) parent.getItemAtPosition(pos); + AltosDebug.debug("Site selected: %s\n", site.toString()); + + latitude.setText(new StringBuffer(String.format("%12.6f", site.latitude))); + longitude.setText(new StringBuffer(String.format("%12.6f", site.longitude))); + } + public void onNothingSelected(AdapterView parent) { + } + + public SiteListListener() { + } + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + AltosDebug.debug("preload map onCreate"); + + // Setup the window + requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); + setContentView(R.layout.map_preload); + + // Set result CANCELED incase the user backs out + setResult(Activity.RESULT_CANCELED); + + // Initialize the button to perform device discovery + Button loadButton = (Button) findViewById(R.id.preload_load); + loadButton.setOnClickListener(new OnClickListener() { + public void onClick(View v) { + load(); + } + }); + + latitude = (EditText) findViewById(R.id.preload_latitude); + longitude = (EditText) findViewById(R.id.preload_longitude); + + hybrid = (CheckBox) findViewById(R.id.preload_hybrid); + satellite = (CheckBox) findViewById(R.id.preload_satellite); + roadmap = (CheckBox) findViewById(R.id.preload_roadmap); + terrain = (CheckBox) findViewById(R.id.preload_terrain); + + hybrid.setChecked(true); + + min_zoom = (Spinner) findViewById(R.id.preload_min_zoom); + add_numbers(min_zoom, + AltosMap.min_zoom - AltosMap.default_zoom, + AltosMap.max_zoom - AltosMap.default_zoom, -2); + max_zoom = (Spinner) findViewById(R.id.preload_max_zoom); + add_numbers(max_zoom, + AltosMap.min_zoom - AltosMap.default_zoom, + AltosMap.max_zoom - AltosMap.default_zoom, 2); + tile_radius = (Spinner) findViewById(R.id.preload_tile_radius); + add_numbers(tile_radius, 1, 5, 3); + + progress = (ProgressBar) findViewById(R.id.preload_progress); + + // Initialize array adapters. One for already paired devices and + // one for newly discovered devices + Spinner known_sites_spinner = (Spinner) findViewById(R.id.preload_site_list); + + known_sites_adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item); + + known_sites_adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); + + known_sites_spinner.setAdapter(known_sites_adapter); + known_sites_spinner.setOnItemSelectedListener(new SiteListListener()); + + map = new AltosMap(this); + + loader = new AltosMapLoader(map, this); + + new AltosLaunchSites(this); + } + + @Override + protected void onDestroy() { + super.onDestroy(); + } +} -- cgit v1.2.3 From 2e424f8dc2886aa475e6ddb21457eba08f768b16 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 May 2015 22:12:26 -0700 Subject: altosdroid: Add 'Current Location' as an option when preloading maps This lets you load maps around your current location, in case your favorite launch site isn't in the list. Signed-off-by: Keith Packard --- .../altusmetrum/AltosDroid/PreloadMapActivity.java | 67 +++++++++++++++++----- 1 file changed, 53 insertions(+), 14 deletions(-) (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java') diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java b/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java index 2febaf29..2f2f74ce 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java @@ -36,6 +36,10 @@ import android.view.Window; import android.view.View.OnClickListener; import android.widget.*; import android.widget.AdapterView.*; +import android.location.Location; +import android.location.LocationManager; +import android.location.LocationListener; +import android.location.Criteria; import org.altusmetrum.altoslib_7.*; @@ -45,7 +49,7 @@ import org.altusmetrum.altoslib_7.*; * by the user, the MAC address of the device is sent back to the parent * Activity in the result Intent. */ -public class PreloadMapActivity extends Activity implements AltosLaunchSiteListener, AltosMapInterface, AltosMapLoaderListener { +public class PreloadMapActivity extends Activity implements AltosLaunchSiteListener, AltosMapInterface, AltosMapLoaderListener, LocationListener { private ArrayAdapter known_sites_adapter; @@ -54,6 +58,7 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe private CheckBox roadmap; private CheckBox terrain; + private Spinner known_sites_spinner; private Spinner min_zoom; private Spinner max_zoom; private Spinner tile_radius; @@ -65,7 +70,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe /* AltosMapLoaderListener interfaces */ public void loader_start(final int max) { - AltosDebug.debug("loader_start max %d\n", max); this.runOnUiThread(new Runnable() { public void run() { progress.setMax(max); @@ -75,7 +79,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe } public void loader_notify(final int cur, final int max, final String name) { - AltosDebug.debug("loader_notify cur %4d max %4d %s\n", cur, max, name); this.runOnUiThread(new Runnable() { public void run() { progress.setProgress(cur); @@ -84,7 +87,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe } public void loader_done(int max) { - AltosDebug.debug("loader_done max %d\n", max); this.runOnUiThread(new Runnable() { public void run() { progress.setProgress(0); @@ -111,7 +113,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe } public PreloadMapImage(File file) { - AltosDebug.debug("preload file %s\n", file.toString()); } } @@ -160,7 +161,43 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe } public void set_zoom_label(String label) { - AltosDebug.debug("zoom label %s\n", label); + } + + public void debug(String format, Object ... arguments) { + AltosDebug.debug(format, arguments); + } + + /* LocationProvider interface */ + + AltosLaunchSite current_location_site; + + public void onLocationChanged(Location location) { + AltosDebug.debug("location changed"); + if (current_location_site == null) { + AltosLaunchSite selected_item = (AltosLaunchSite) known_sites_spinner.getSelectedItem(); + + current_location_site = new AltosLaunchSite("Current Location", location.getLatitude(), location.getLongitude()); + known_sites_adapter.insert(current_location_site, 0); + + if (selected_item != null) + known_sites_spinner.setSelection(known_sites_adapter.getPosition(selected_item)); + else { + latitude.setText(new StringBuffer(String.format("%12.6f", current_location_site.latitude))); + longitude.setText(new StringBuffer(String.format("%12.6f", current_location_site.longitude))); + } + } else { + current_location_site.latitude = location.getLatitude(); + current_location_site.longitude = location.getLongitude(); + } + } + + public void onStatusChanged(String provider, int status, Bundle extras) { + } + + public void onProviderEnabled(String provider) { + } + + public void onProviderDisabled(String provider) { } private double text(EditText view) throws ParseException { @@ -213,8 +250,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe int r = radius(); int t = types(); - AltosDebug.debug("load lat %12.6f lon %12.6f min %d max %d r %d types %x\n", - lat, lon, min, max, r, t); loader.load(lat, lon, min, max, r, t); } catch (ParseException e) { } @@ -241,8 +276,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe class SiteListListener implements OnItemSelectedListener { public void onItemSelected(AdapterView parent, View view, int pos, long id) { AltosLaunchSite site = (AltosLaunchSite) parent.getItemAtPosition(pos); - AltosDebug.debug("Site selected: %s\n", site.toString()); - latitude.setText(new StringBuffer(String.format("%12.6f", site.latitude))); longitude.setText(new StringBuffer(String.format("%12.6f", site.longitude))); } @@ -257,8 +290,6 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - AltosDebug.debug("preload map onCreate"); - // Setup the window requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.map_preload); @@ -293,13 +324,13 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe AltosMap.min_zoom - AltosMap.default_zoom, AltosMap.max_zoom - AltosMap.default_zoom, 2); tile_radius = (Spinner) findViewById(R.id.preload_tile_radius); - add_numbers(tile_radius, 1, 5, 3); + add_numbers(tile_radius, 1, 5, 5); progress = (ProgressBar) findViewById(R.id.preload_progress); // Initialize array adapters. One for already paired devices and // one for newly discovered devices - Spinner known_sites_spinner = (Spinner) findViewById(R.id.preload_site_list); + known_sites_spinner = (Spinner) findViewById(R.id.preload_site_list); known_sites_adapter = new ArrayAdapter(this, android.R.layout.simple_spinner_item); @@ -312,11 +343,19 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe loader = new AltosMapLoader(map, this); + // Listen for GPS and Network position updates + LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); + + locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 1, this); + new AltosLaunchSites(this); } @Override protected void onDestroy() { super.onDestroy(); + + // Stop listening for location updates + ((LocationManager) getSystemService(Context.LOCATION_SERVICE)).removeUpdates(this); } } -- cgit v1.2.3 From 2b6768ed32d7be444c49caa40d30b520177bb22a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 22 Jun 2015 20:43:23 -0700 Subject: altosdroid: Switch to four tabs (pad/flight/recover/map) Ascent and descent were almost the same; no reason to have both. Signed-off-by: Keith Packard --- altosdroid/res/layout/tab_ascent.xml | 299 ---------------- altosdroid/res/layout/tab_descent.xml | 339 ------------------ altosdroid/res/layout/tab_flight.xml | 391 +++++++++++++++++++++ altosdroid/res/layout/tab_landed.xml | 211 ----------- altosdroid/res/layout/tab_recover.xml | 211 +++++++++++ .../src/org/altusmetrum/AltosDroid/AltosDroid.java | 18 +- .../altusmetrum/AltosDroid/PreloadMapActivity.java | 3 + .../src/org/altusmetrum/AltosDroid/TabAscent.java | 101 ------ .../src/org/altusmetrum/AltosDroid/TabDescent.java | 106 ------ .../src/org/altusmetrum/AltosDroid/TabFlight.java | 134 +++++++ .../src/org/altusmetrum/AltosDroid/TabLanded.java | 82 ----- .../src/org/altusmetrum/AltosDroid/TabRecover.java | 82 +++++ 12 files changed, 828 insertions(+), 1149 deletions(-) delete mode 100644 altosdroid/res/layout/tab_ascent.xml delete mode 100644 altosdroid/res/layout/tab_descent.xml create mode 100644 altosdroid/res/layout/tab_flight.xml delete mode 100644 altosdroid/res/layout/tab_landed.xml create mode 100644 altosdroid/res/layout/tab_recover.xml delete mode 100644 altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java delete mode 100644 altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java create mode 100644 altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java delete mode 100644 altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java create mode 100644 altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java') diff --git a/altosdroid/res/layout/tab_ascent.xml b/altosdroid/res/layout/tab_ascent.xml deleted file mode 100644 index b21ec426..00000000 --- a/altosdroid/res/layout/tab_ascent.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/altosdroid/res/layout/tab_descent.xml b/altosdroid/res/layout/tab_descent.xml deleted file mode 100644 index 9e1fc820..00000000 --- a/altosdroid/res/layout/tab_descent.xml +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/altosdroid/res/layout/tab_flight.xml b/altosdroid/res/layout/tab_flight.xml new file mode 100644 index 00000000..4fa026ca --- /dev/null +++ b/altosdroid/res/layout/tab_flight.xml @@ -0,0 +1,391 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/altosdroid/res/layout/tab_landed.xml b/altosdroid/res/layout/tab_landed.xml deleted file mode 100644 index f27baa9e..00000000 --- a/altosdroid/res/layout/tab_landed.xml +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/altosdroid/res/layout/tab_recover.xml b/altosdroid/res/layout/tab_recover.xml new file mode 100644 index 00000000..f27baa9e --- /dev/null +++ b/altosdroid/res/layout/tab_recover.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java index c5da6d0e..6cd9463a 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroid.java @@ -399,9 +399,9 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener { if (prev_locked != locked) { String currentTab = mTabHost.getCurrentTabTag(); if (locked) { - if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("descent"); + if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("flight"); } else { - if (currentTab.equals("descent")) mTabHost.setCurrentTabByTag("pad"); + if (currentTab.equals("flight")) mTabHost.setCurrentTabByTag("pad"); } } } else { @@ -409,16 +409,13 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener { String currentTab = mTabHost.getCurrentTabTag(); switch (state.state) { case AltosLib.ao_flight_boost: - if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("ascent"); - break; - case AltosLib.ao_flight_drogue: - if (currentTab.equals("ascent")) mTabHost.setCurrentTabByTag("descent"); + if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("flight"); break; case AltosLib.ao_flight_landed: - if (currentTab.equals("descent")) mTabHost.setCurrentTabByTag("landed"); + if (currentTab.equals("flight")) mTabHost.setCurrentTabByTag("recover"); break; case AltosLib.ao_flight_stateless: - if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("descent"); + if (currentTab.equals("pad")) mTabHost.setCurrentTabByTag("flight"); break; } } @@ -539,9 +536,8 @@ public class AltosDroid extends FragmentActivity implements AltosUnitsListener { mTabsAdapter = new TabsAdapter(this, mTabHost, mViewPager); mTabsAdapter.addTab(mTabHost.newTabSpec("pad").setIndicator(create_tab_view("Pad")), TabPad.class, null); - mTabsAdapter.addTab(mTabHost.newTabSpec("ascent").setIndicator(create_tab_view("Ascent")), TabAscent.class, null); - mTabsAdapter.addTab(mTabHost.newTabSpec("descent").setIndicator(create_tab_view("Descent")), TabDescent.class, null); - mTabsAdapter.addTab(mTabHost.newTabSpec("landed").setIndicator(create_tab_view("Landed")), TabLanded.class, null); + mTabsAdapter.addTab(mTabHost.newTabSpec("flight").setIndicator(create_tab_view("Flight")), TabFlight.class, null); + mTabsAdapter.addTab(mTabHost.newTabSpec("recover").setIndicator(create_tab_view("Recover")), TabRecover.class, null); mTabsAdapter.addTab(mTabHost.newTabSpec("map").setIndicator(create_tab_view("Map")), TabMap.class, null); // Display the Version diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java b/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java index 2f2f74ce..1968edae 100644 --- a/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java +++ b/altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java @@ -163,6 +163,9 @@ public class PreloadMapActivity extends Activity implements AltosLaunchSiteListe public void set_zoom_label(String label) { } + public void select_object(AltosLatLon latlon) { + } + public void debug(String format, Object ... arguments) { AltosDebug.debug(format, arguments); } diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java deleted file mode 100644 index afce937f..00000000 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabAscent.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright © 2013 Mike Beattie - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ - -package org.altusmetrum.AltosDroid; - -import org.altusmetrum.altoslib_7.*; - -import android.app.Activity; -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; -import android.location.Location; - -public class TabAscent extends AltosDroidTab { - private TextView mHeightView; - private TextView mMaxHeightView; - private TextView mSpeedView; - private TextView mMaxSpeedView; - private TextView mAccelView; - private TextView mMaxAccelView; - private TextView mLatitudeView; - private TextView mLongitudeView; - private TextView mApogeeVoltageView; - private GoNoGoLights mApogeeLights; - private TextView mMainVoltageView; - private GoNoGoLights mMainLights; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.tab_ascent, container, false); - - mHeightView = (TextView) v.findViewById(R.id.height_value); - mMaxHeightView = (TextView) v.findViewById(R.id.max_height_value); - mSpeedView = (TextView) v.findViewById(R.id.speed_value); - mMaxSpeedView = (TextView) v.findViewById(R.id.max_speed_value); - mAccelView = (TextView) v.findViewById(R.id.accel_value); - mMaxAccelView = (TextView) v.findViewById(R.id.max_accel_value); - mLatitudeView = (TextView) v.findViewById(R.id.lat_value); - mLongitudeView = (TextView) v.findViewById(R.id.lon_value); - - mApogeeVoltageView = (TextView) v.findViewById(R.id.apogee_voltage_value); - mApogeeLights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled), - (ImageView) v.findViewById(R.id.apogee_greenled), - getResources()); - - mMainVoltageView = (TextView) v.findViewById(R.id.main_voltage_value); - mMainLights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled), - (ImageView) v.findViewById(R.id.main_greenled), - getResources()); - - return v; - } - - public String tab_name() { - return "ascent"; - } - - public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) { - if (state != null) { - set_value(mHeightView, AltosConvert.height, 6, state.height()); - set_value(mHeightView, AltosConvert.height, 6, state.height()); - set_value(mMaxHeightView, AltosConvert.height, 6, state.max_height()); - set_value(mSpeedView, AltosConvert.speed, 6, state.speed()); - set_value(mMaxSpeedView, AltosConvert.speed, 6, state.max_speed()); - set_value(mAccelView, AltosConvert.accel, 6, state.acceleration()); - set_value(mMaxAccelView, AltosConvert.accel, 6, state.max_acceleration()); - - if (state.gps != null) { - mLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S")); - mLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W")); - } else { - mLatitudeView.setText(""); - mLongitudeView.setText(""); - } - - mApogeeVoltageView.setText(AltosDroid.number("%4.2f V", state.apogee_voltage)); - mApogeeLights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING); - - mMainVoltageView.setText(AltosDroid.number("%4.2f V", state.main_voltage)); - mMainLights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING); - } - } -} diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java deleted file mode 100644 index 3429ee72..00000000 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabDescent.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright © 2013 Mike Beattie - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ - -package org.altusmetrum.AltosDroid; - -import org.altusmetrum.altoslib_7.*; - -import android.app.Activity; -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ImageView; -import android.widget.TextView; -import android.location.Location; - -public class TabDescent extends AltosDroidTab { - private TextView mSpeedView; - private TextView mHeightView; - private TextView mElevationView; - private TextView mRangeView; - private TextView mBearingView; - private TextView mCompassView; - private TextView mDistanceView; - private TextView mLatitudeView; - private TextView mLongitudeView; - private TextView mApogeeVoltageView; - private GoNoGoLights mApogeeLights; - private TextView mMainVoltageView; - private GoNoGoLights mMainLights; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.tab_descent, container, false); - - mSpeedView = (TextView) v.findViewById(R.id.speed_value); - mHeightView = (TextView) v.findViewById(R.id.height_value); - mElevationView = (TextView) v.findViewById(R.id.elevation_value); - mRangeView = (TextView) v.findViewById(R.id.range_value); - mBearingView = (TextView) v.findViewById(R.id.bearing_value); - mCompassView = (TextView) v.findViewById(R.id.compass_value); - mDistanceView = (TextView) v.findViewById(R.id.distance_value); - mLatitudeView = (TextView) v.findViewById(R.id.lat_value); - mLongitudeView = (TextView) v.findViewById(R.id.lon_value); - - mApogeeVoltageView = (TextView) v.findViewById(R.id.apogee_voltage_value); - mApogeeLights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled), - (ImageView) v.findViewById(R.id.apogee_greenled), - getResources()); - - mMainVoltageView = (TextView) v.findViewById(R.id.main_voltage_value); - mMainLights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled), - (ImageView) v.findViewById(R.id.main_greenled), - getResources()); - - return v; - } - - public String tab_name() { return "descent"; } - - public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) { - if (state != null) { - set_value(mSpeedView, AltosConvert.speed, 6, state.speed()); - set_value(mHeightView, AltosConvert.height, 6, state.height()); - if (from_receiver != null) { - mElevationView.setText(AltosDroid.number("%3.0f°", from_receiver.elevation)); - set_value(mRangeView, AltosConvert.distance, 6, from_receiver.range); - mBearingView.setText(AltosDroid.number("%3.0f°", from_receiver.bearing)); - mCompassView.setText(from_receiver.bearing_words(AltosGreatCircle.BEARING_LONG)); - set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance); - } else { - mElevationView.setText(""); - mRangeView.setText(""); - mBearingView.setText(""); - mCompassView.setText(""); - mDistanceView.setText(""); - } - if (state.gps != null) { - mLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S")); - mLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W")); - } - - mApogeeVoltageView.setText(AltosDroid.number("%4.2f V", state.apogee_voltage)); - mApogeeLights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING); - - mMainVoltageView.setText(AltosDroid.number("%4.2f V", state.main_voltage)); - mMainLights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING); - } - } - -} diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java new file mode 100644 index 00000000..e1fc737d --- /dev/null +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabFlight.java @@ -0,0 +1,134 @@ +/* + * Copyright © 2013 Mike Beattie + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.AltosDroid; + +import org.altusmetrum.altoslib_7.*; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.ImageView; +import android.widget.TextView; +import android.location.Location; + +public class TabFlight extends AltosDroidTab { + private TextView speed_view; + private TextView height_view; + private TextView max_speed_view; + private TextView max_height_view; + private TextView elevation_view; + private TextView range_view; + private TextView bearing_view; + private TextView compass_view; + private TextView distance_view; + private TextView latitude_view; + private TextView longitude_view; + private TextView apogee_voltage_view; + private TextView apogee_voltage_label; + private GoNoGoLights apogee_lights; + private TextView main_voltage_view; + private TextView main_voltage_label; + private GoNoGoLights main_lights; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View v = inflater.inflate(R.layout.tab_flight, container, false); + + speed_view = (TextView) v.findViewById(R.id.speed_value); + height_view = (TextView) v.findViewById(R.id.height_value); + max_speed_view = (TextView) v.findViewById(R.id.max_speed_value); + max_height_view= (TextView) v.findViewById(R.id.max_height_value); + elevation_view = (TextView) v.findViewById(R.id.elevation_value); + range_view = (TextView) v.findViewById(R.id.range_value); + bearing_view = (TextView) v.findViewById(R.id.bearing_value); + compass_view = (TextView) v.findViewById(R.id.compass_value); + distance_view = (TextView) v.findViewById(R.id.distance_value); + latitude_view = (TextView) v.findViewById(R.id.lat_value); + longitude_view = (TextView) v.findViewById(R.id.lon_value); + + apogee_voltage_view = (TextView) v.findViewById(R.id.apogee_voltage_value); + apogee_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.apogee_redled), + (ImageView) v.findViewById(R.id.apogee_greenled), + getResources()); + apogee_voltage_label = (TextView) v.findViewById(R.id.apogee_voltage_label); + + main_voltage_view = (TextView) v.findViewById(R.id.main_voltage_value); + main_lights = new GoNoGoLights((ImageView) v.findViewById(R.id.main_redled), + (ImageView) v.findViewById(R.id.main_greenled), + getResources()); + main_voltage_label = (TextView) v.findViewById(R.id.main_voltage_label); + + return v; + } + + public String tab_name() { return "flight"; } + + public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) { + if (state != null) { + set_value(speed_view, AltosConvert.speed, 6, state.speed()); + set_value(height_view, AltosConvert.height, 6, state.height()); + set_value(max_speed_view, AltosConvert.speed, 6, state.max_speed()); + set_value(max_height_view, AltosConvert.speed, 6, state.max_height()); + if (from_receiver != null) { + elevation_view.setText(AltosDroid.number("%3.0f°", from_receiver.elevation)); + set_value(range_view, AltosConvert.distance, 6, from_receiver.range); + bearing_view.setText(AltosDroid.number("%3.0f°", from_receiver.bearing)); + compass_view.setText(from_receiver.bearing_words(AltosGreatCircle.BEARING_LONG)); + set_value(distance_view, AltosConvert.distance, 6, from_receiver.distance); + } else { + elevation_view.setText(""); + range_view.setText(""); + bearing_view.setText(""); + compass_view.setText(""); + distance_view.setText(""); + } + if (state.gps != null) { + latitude_view.setText(AltosDroid.pos(state.gps.lat, "N", "S")); + longitude_view.setText(AltosDroid.pos(state.gps.lon, "E", "W")); + } + + if (state.apogee_voltage == AltosLib.MISSING) { + apogee_voltage_view.setVisibility(View.GONE); + apogee_voltage_label.setVisibility(View.GONE); + apogee_lights.hide(); + } else { + apogee_voltage_view.setText(AltosDroid.number("%4.2f V", state.apogee_voltage)); + apogee_voltage_view.setVisibility(View.VISIBLE); + apogee_voltage_label.setVisibility(View.VISIBLE); + apogee_lights.set(state.apogee_voltage > 3.2, state.apogee_voltage == AltosLib.MISSING); + apogee_lights.show(); + } + + if (state.main_voltage == AltosLib.MISSING) { + main_voltage_view.setVisibility(View.GONE); + main_voltage_label.setVisibility(View.GONE); + main_lights.hide(); + } else { + main_voltage_view.setText(AltosDroid.number("%4.2f V", state.main_voltage)); + main_voltage_view.setVisibility(View.VISIBLE); + main_voltage_label.setVisibility(View.VISIBLE); + main_lights.set(state.main_voltage > 3.2, state.main_voltage == AltosLib.MISSING); + main_lights.show(); + } + } + } + +} diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java deleted file mode 100644 index dd3f938e..00000000 --- a/altosdroid/src/org/altusmetrum/AltosDroid/TabLanded.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright © 2013 Mike Beattie - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - */ - -package org.altusmetrum.AltosDroid; - -import org.altusmetrum.altoslib_7.*; - -import android.app.Activity; -import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; -import android.location.Location; - -public class TabLanded extends AltosDroidTab { - private TextView mBearingView; - private TextView mDistanceView; - private TextView mTargetLatitudeView; - private TextView mTargetLongitudeView; - private TextView mReceiverLatitudeView; - private TextView mReceiverLongitudeView; - private TextView mMaxHeightView; - private TextView mMaxSpeedView; - private TextView mMaxAccelView; - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { - View v = inflater.inflate(R.layout.tab_landed, container, false); - - mBearingView = (TextView) v.findViewById(R.id.bearing_value); - mDistanceView = (TextView) v.findViewById(R.id.distance_value); - mTargetLatitudeView = (TextView) v.findViewById(R.id.target_lat_value); - mTargetLongitudeView = (TextView) v.findViewById(R.id.target_lon_value); - mReceiverLatitudeView = (TextView) v.findViewById(R.id.receiver_lat_value); - mReceiverLongitudeView = (TextView) v.findViewById(R.id.receiver_lon_value); - mMaxHeightView = (TextView) v.findViewById(R.id.max_height_value); - mMaxSpeedView = (TextView) v.findViewById(R.id.max_speed_value); - mMaxAccelView = (TextView) v.findViewById(R.id.max_accel_value); - - return v; - } - - public String tab_name() { return "landed"; } - - public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) { - if (from_receiver != null) { - mBearingView.setText(String.format("%3.0f°", from_receiver.bearing)); - set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance); - } - if (state != null && state.gps != null) { - mTargetLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S")); - mTargetLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W")); - } - - if (receiver != null) { - mReceiverLatitudeView.setText(AltosDroid.pos(receiver.getLatitude(), "N", "S")); - mReceiverLongitudeView.setText(AltosDroid.pos(receiver.getLongitude(), "E", "W")); - } - - if (state != null) { - set_value(mMaxHeightView, AltosConvert.height, 6, state.max_height()); - set_value(mMaxAccelView, AltosConvert.accel, 6, state.max_acceleration()); - set_value(mMaxSpeedView, AltosConvert.speed, 6, state.max_speed()); - } - } -} diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java b/altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java new file mode 100644 index 00000000..0ab20f5f --- /dev/null +++ b/altosdroid/src/org/altusmetrum/AltosDroid/TabRecover.java @@ -0,0 +1,82 @@ +/* + * Copyright © 2013 Mike Beattie + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + +package org.altusmetrum.AltosDroid; + +import org.altusmetrum.altoslib_7.*; + +import android.app.Activity; +import android.os.Bundle; +import android.support.v4.app.Fragment; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; +import android.location.Location; + +public class TabRecover extends AltosDroidTab { + private TextView mBearingView; + private TextView mDistanceView; + private TextView mTargetLatitudeView; + private TextView mTargetLongitudeView; + private TextView mReceiverLatitudeView; + private TextView mReceiverLongitudeView; + private TextView mMaxHeightView; + private TextView mMaxSpeedView; + private TextView mMaxAccelView; + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + View v = inflater.inflate(R.layout.tab_recover, container, false); + + mBearingView = (TextView) v.findViewById(R.id.bearing_value); + mDistanceView = (TextView) v.findViewById(R.id.distance_value); + mTargetLatitudeView = (TextView) v.findViewById(R.id.target_lat_value); + mTargetLongitudeView = (TextView) v.findViewById(R.id.target_lon_value); + mReceiverLatitudeView = (TextView) v.findViewById(R.id.receiver_lat_value); + mReceiverLongitudeView = (TextView) v.findViewById(R.id.receiver_lon_value); + mMaxHeightView = (TextView) v.findViewById(R.id.max_height_value); + mMaxSpeedView = (TextView) v.findViewById(R.id.max_speed_value); + mMaxAccelView = (TextView) v.findViewById(R.id.max_accel_value); + + return v; + } + + public String tab_name() { return "recover"; } + + public void show(TelemetryState telem_state, AltosState state, AltosGreatCircle from_receiver, Location receiver) { + if (from_receiver != null) { + mBearingView.setText(String.format("%3.0f°", from_receiver.bearing)); + set_value(mDistanceView, AltosConvert.distance, 6, from_receiver.distance); + } + if (state != null && state.gps != null) { + mTargetLatitudeView.setText(AltosDroid.pos(state.gps.lat, "N", "S")); + mTargetLongitudeView.setText(AltosDroid.pos(state.gps.lon, "E", "W")); + } + + if (receiver != null) { + mReceiverLatitudeView.setText(AltosDroid.pos(receiver.getLatitude(), "N", "S")); + mReceiverLongitudeView.setText(AltosDroid.pos(receiver.getLongitude(), "E", "W")); + } + + if (state != null) { + set_value(mMaxHeightView, AltosConvert.height, 6, state.max_height()); + set_value(mMaxAccelView, AltosConvert.accel, 6, state.max_acceleration()); + set_value(mMaxSpeedView, AltosConvert.speed, 6, state.max_speed()); + } + } +} -- cgit v1.2.3 From d015cfc1499a263549f52d46e9e5b934fcb94f53 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 11 Jul 2015 19:15:08 -0700 Subject: altoslib: Preload maps based on distance rather than number of tiles This lets you get the specific area requested at all zoom levels, rather than having further detail only at lower resolution zooms. Signed-off-by: Keith Packard --- altosdroid/res/layout/map_preload.xml | 8 +- altosdroid/res/values/strings.xml | 2 +- .../altusmetrum/AltosDroid/PreloadMapActivity.java | 66 +++++++++++++-- altoslib/AltosMapLoader.java | 99 ++++++++++++++++++---- altoslib/AltosMapLoaderListener.java | 2 + altosuilib/AltosUIMapPreloadNew.java | 35 ++++++-- 6 files changed, 179 insertions(+), 33 deletions(-) (limited to 'altosdroid/src/org/altusmetrum/AltosDroid/PreloadMapActivity.java') diff --git a/altosdroid/res/layout/map_preload.xml b/altosdroid/res/layout/map_preload.xml index 1d1fca32..dc613bf2 100644 --- a/altosdroid/res/layout/map_preload.xml +++ b/altosdroid/res/layout/map_preload.xml @@ -103,15 +103,15 @@ android:prompt="@string/preload_max_zoom" android:spinnerMode="dropdown" /> - -