From e64b89bce61b66416ac1c5d5efe1ff7dfcf000f4 Mon Sep 17 00:00:00 2001 From: Daniele Date: Tue, 5 Oct 2021 19:15:02 +0200 Subject: [PATCH] Updated about, hidden accuracy when creating by geouri, alphabetic category order --- .../activity/about/AboutActivity.java | 4 ++++ .../activity/detail/GeofavoriteDetailActivity.java | 2 ++ .../nextcloudmaps/model/Geofavorite.java | 2 +- app/src/main/res/layout/activity_about.xml | 14 ++++++++++++++ app/src/main/res/values/strings.xml | 5 ++++- 5 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/about/AboutActivity.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/about/AboutActivity.java index f370b0f..8315073 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/about/AboutActivity.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/about/AboutActivity.java @@ -62,6 +62,10 @@ public class AboutActivity extends AppCompatActivity { TextView tvIssues = findViewById(R.id.about_issues); tvIssues.setText(Html.fromHtml(getString(R.string.about_issues, getString(R.string.url_issues)))); tvIssues.setOnClickListener(view -> openUtl(getString(R.string.url_issues))); + + TextView tvMaps = findViewById(R.id.about_maps); + tvMaps.setText(Html.fromHtml(getString(R.string.about_maps))); + tvMaps.setOnClickListener(view -> openUtl(getString(R.string.url_maps))); } @Override diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java index 6a712f2..d5092fd 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/activity/detail/GeofavoriteDetailActivity.java @@ -165,6 +165,7 @@ public class GeofavoriteDetailActivity extends AppCompatActivity implements Loca double[] coords = GeoUriParser.parseUri(getIntent().getData()); mGeofavorite.setLat(coords[0]); mGeofavorite.setLng(coords[1]); + mViewHolder.hideAccuracy(); } catch (IllegalArgumentException e) { Toast.makeText(this, R.string.error_unsupported_uri, Toast.LENGTH_SHORT).show(); finish(); @@ -319,6 +320,7 @@ public class GeofavoriteDetailActivity extends AppCompatActivity implements Loca // Set map properties this.binding.map.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.NEVER); this.binding.map.setMultiTouchControls(true); +// this.binding.map.setTilesScaledToDpi(true); // Create marker mapMarker = new Marker(binding.map); diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/model/Geofavorite.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/model/Geofavorite.java index 207d4ca..51d129b 100644 --- a/app/src/main/java/it/danieleverducci/nextcloudmaps/model/Geofavorite.java +++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/model/Geofavorite.java @@ -154,7 +154,7 @@ public class Geofavorite implements Serializable { */ public static Comparator ByTitleAZ = (gf0, gf1) -> gf0.name.compareTo(gf1.name); public static Comparator ByLastCreated = (gf0, gf1) -> (int) (gf1.dateCreated - gf0.dateCreated); - public static Comparator ByCategory = (gf0, gf1) -> gf0.category.compareTo(gf1.category); + public static Comparator ByCategory = (gf0, gf1) -> (gf0.category + gf0.name).compareTo(gf1.category + gf1.name); public static Comparator ByDistance = (gf0, gf1) -> 0; // (int) ((gf1.getDistanceFrom(userPosition) - gf0.getDistanceFrom(userPosition)) * 1000); public String getCoordinatesString() { diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 0d3756a..b1cf7fc 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -115,6 +115,20 @@ android:layout_height="wrap_content" android:padding="10dp" android:text="@string/about_issues" /> + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 0726995..934b689 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -69,6 +69,8 @@ This project is hosted on GitHub: <a href="%1$s">%1$s</a> Issues You can report bugs, enhancement proposals and feature requests at the GitHub issue tracker: <a href="%1$s">%1$s</a> + Maps + This app uses Open Street Maps tiles and servers to display the map. I do not accept any donation for this app, but strongly encourage to make any donation to <a href="%1$s">OpenStreetMap</a>, as this application could not exist without them. App license This application is licensed under the GNU GENERAL PUBLIC LICENSE v3+. View license @@ -79,8 +81,9 @@ https://github.com/penguin86/nextcloud-maps-client - https://github.com/penguin86/nextcloud-maps-client/issues/new/choose + https://github.com/penguin86/nextcloud-maps-client/issues https://raw.githubusercontent.com/penguin86/nextcloud-maps-client/master/LICENSE + https://donate.openstreetmap.org SETTING_SORT_BY