Merge branch 'master' of ssh://ichibi.eu:222/home/git/nextcloud-maps-client

This commit is contained in:
Daniele 2021-11-22 08:55:42 +01:00
commit 8f054dd324
5 changed files with 25 additions and 2 deletions

View File

@ -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

View File

@ -169,6 +169,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();
@ -323,6 +324,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);

View File

@ -154,7 +154,7 @@ public class Geofavorite implements Serializable {
*/
public static Comparator<Geofavorite> ByTitleAZ = (gf0, gf1) -> gf0.name.compareTo(gf1.name);
public static Comparator<Geofavorite> ByLastCreated = (gf0, gf1) -> (int) (gf1.dateCreated - gf0.dateCreated);
public static Comparator<Geofavorite> ByCategory = (gf0, gf1) -> gf0.category.compareTo(gf1.category);
public static Comparator<Geofavorite> ByCategory = (gf0, gf1) -> (gf0.category + gf0.name).compareTo(gf1.category + gf1.name);
public static Comparator<Geofavorite> ByDistance = (gf0, gf1) -> 0; // (int) ((gf1.getDistanceFrom(userPosition) - gf0.getDistanceFrom(userPosition)) * 1000);
public String getCoordinatesString() {

View File

@ -115,6 +115,20 @@
android:layout_height="wrap_content"
android:padding="10dp"
android:text="@string/about_issues" />
<TextView
style="?android:attr/listSeparatorTextViewStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/about_maps_title" />
<TextView
android:id="@+id/about_maps"
style="?android:attr/editTextPreferenceStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:text="@string/about_maps" />
</LinearLayout>
</com.google.android.material.appbar.AppBarLayout>

View File

@ -69,6 +69,8 @@
<string name="about_source">This project is hosted on GitHub: &lt;a href="%1$s">%1$s&lt;/a></string>
<string name="about_issues_title">Issues</string>
<string name="about_issues">You can report bugs, enhancement proposals and feature requests at the GitHub issue tracker: &lt;a href="%1$s">%1$s&lt;/a></string>
<string name="about_maps_title">Maps</string>
<string name="about_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 &lt;a href="%1$s">OpenStreetMap&lt;/a>, as this application could not exist without them.</string>
<string name="about_app_license_title">App license</string>
<string name="about_app_license">This application is licensed under the GNU GENERAL PUBLIC LICENSE v3+.</string>
<string name="about_app_license_button">View license</string>
@ -79,8 +81,9 @@
<!-- URLs -->
<string name="url_source" translatable="false">https://github.com/penguin86/nextcloud-maps-client</string>
<string name="url_issues" translatable="false">https://github.com/penguin86/nextcloud-maps-client/issues/new/choose</string>
<string name="url_issues" translatable="false">https://github.com/penguin86/nextcloud-maps-client/issues</string>
<string name="url_license" translatable="false">https://raw.githubusercontent.com/penguin86/nextcloud-maps-client/master/LICENSE</string>
<string name="url_maps" translatable="false">https://donate.openstreetmap.org</string>
<!-- Settings -->
<string name="setting_sort_by">SETTING_SORT_BY</string>