diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java
index 02829db..1770596 100644
--- a/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java
+++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/fragments/GeofavoriteMapFragment.java
@@ -15,6 +15,7 @@ import androidx.lifecycle.Observer;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.Marker;
+import org.osmdroid.views.overlay.infowindow.MarkerInfoWindow;
import java.util.List;
@@ -22,6 +23,7 @@ import it.danieleverducci.nextcloudmaps.R;
import it.danieleverducci.nextcloudmaps.activity.main.MainActivity;
import it.danieleverducci.nextcloudmaps.model.Geofavorite;
import it.danieleverducci.nextcloudmaps.utils.MapUtils;
+import it.danieleverducci.nextcloudmaps.views.GeofavMarkerInfoWindow;
public class GeofavoriteMapFragment extends GeofavoritesFragment {
private MapView map;
@@ -86,6 +88,7 @@ public class GeofavoriteMapFragment extends GeofavoritesFragment {
m.setTitle(geofavorite.getName());
m.setSnippet(geofavorite.getComment());
m.setSubDescription(geofavorite.getCategory());
+ m.setInfoWindow(new GeofavMarkerInfoWindow(map));
map.getOverlays().add(m);
}
}
diff --git a/app/src/main/java/it/danieleverducci/nextcloudmaps/views/GeofavMarkerInfoWindow.java b/app/src/main/java/it/danieleverducci/nextcloudmaps/views/GeofavMarkerInfoWindow.java
new file mode 100644
index 0000000..417f95a
--- /dev/null
+++ b/app/src/main/java/it/danieleverducci/nextcloudmaps/views/GeofavMarkerInfoWindow.java
@@ -0,0 +1,25 @@
+package it.danieleverducci.nextcloudmaps.views;
+
+import org.osmdroid.views.MapView;
+import org.osmdroid.views.overlay.infowindow.MarkerInfoWindow;
+
+import it.danieleverducci.nextcloudmaps.R;
+
+public class GeofavMarkerInfoWindow extends MarkerInfoWindow {
+ /**
+ * @param mapView
+ */
+ public GeofavMarkerInfoWindow(MapView mapView) {
+ super(R.layout.infowindow_geofav, mapView);
+ }
+
+ @Override
+ public void onOpen(Object item) {
+ super.onOpen(item);
+ }
+
+ @Override
+ public void onClose() {
+ super.onClose();
+ }
+}
diff --git a/app/src/main/res/drawable/geofav_infowindow_pointer.xml b/app/src/main/res/drawable/geofav_infowindow_pointer.xml
new file mode 100644
index 0000000..a1fa742
--- /dev/null
+++ b/app/src/main/res/drawable/geofav_infowindow_pointer.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/infowindow_geofav_background.xml b/app/src/main/res/drawable/infowindow_geofav_background.xml
new file mode 100644
index 0000000..a6a34a4
--- /dev/null
+++ b/app/src/main/res/drawable/infowindow_geofav_background.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/infowindow_geofav.xml b/app/src/main/res/layout/infowindow_geofav.xml
new file mode 100644
index 0000000..f56062a
--- /dev/null
+++ b/app/src/main/res/layout/infowindow_geofav.xml
@@ -0,0 +1,92 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index f77f048..4ca12b7 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -48,4 +48,8 @@
- @color/white
+
+
\ No newline at end of file