diff --git a/OsmAnd/res/layout/map_marker_item.xml b/OsmAnd/res/layout/map_marker_item.xml index 58d93922f4..bdf2138999 100644 --- a/OsmAnd/res/layout/map_marker_item.xml +++ b/OsmAnd/res/layout/map_marker_item.xml @@ -1,37 +1,46 @@ - + + + + android:layout_height="25dp" + android:layout_gravity="center_vertical" + android:src="@drawable/ic_action_fav_dark"/> + android:ellipsize="end" + android:maxLines="2" + android:textSize="@dimen/default_list_text_size"/> + android:textSize="@dimen/default_sub_text_size"/> @@ -86,28 +95,28 @@ + android:src="@drawable/map_overflow_menu_white" + android:visibility="gone"/> + android:src="@drawable/ic_action_remove_dark"/> diff --git a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java index ee3169881c..57d518451f 100644 --- a/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java +++ b/OsmAnd/src/net/osmand/plus/MapMarkersHelper.java @@ -35,13 +35,16 @@ public class MapMarkersHelper { public int pos; public int index; public boolean history; + public boolean selected; public int dist; - public MapMarker(LatLon point, PointDescription name, int colorIndex, int pos, int index) { + public MapMarker(LatLon point, PointDescription name, int colorIndex, int pos, + boolean selected, int index) { this.point = point; this.pointDescription = name; this.colorIndex = colorIndex; this.pos = pos; + this.selected = selected; this.index = index; } @@ -58,10 +61,6 @@ public class MapMarkersHelper { return pointDescription == null ? "" : pointDescription.getName(); } - public boolean isSearchingAddress(Context ctx) { - return pointDescription != null && pointDescription.isSearchingAddress(ctx); - } - public double getLatitude() { return point.getLatitude(); } @@ -95,6 +94,7 @@ public class MapMarkersHelper { List desc = settings.getMapMarkersPointDescriptions(ips.size()); List colors = settings.getMapMarkersColors(ips.size()); List positions = settings.getMapMarkersPositions(ips.size()); + List selections = settings.getMapMarkersSelections(ips.size()); int colorIndex = 0; int pos = 0; for (int i = 0; i < ips.size(); i++) { @@ -108,7 +108,7 @@ public class MapMarkersHelper { } MapMarker mapMarker = new MapMarker(ips.get(i), PointDescription.deserializeFromString(desc.get(i), ips.get(i)), colorIndex, - pos, i); + pos, selections.get(i), i); mapMarkers.add(mapMarker); lookupAddress(mapMarker, false); } @@ -117,10 +117,9 @@ public class MapMarkersHelper { ips = settings.getMapMarkersHistoryPoints(); desc = settings.getMapMarkersHistoryPointDescriptions(ips.size()); - colors = settings.getMapMarkersHistoryColors(ips.size()); for (int i = 0; i < ips.size(); i++) { MapMarker mapMarker = new MapMarker(ips.get(i), - PointDescription.deserializeFromString(desc.get(i), ips.get(i)), colors.get(i), 0, i); + PointDescription.deserializeFromString(desc.get(i), ips.get(i)), 0, 0, false, i); mapMarker.history = true; mapMarkersHistory.add(mapMarker); lookupAddress(mapMarker, true); @@ -162,7 +161,7 @@ public class MapMarkersHelper { mapMarker.pointDescription, mapMarker.colorIndex); } else { settings.updateMapMarker(mapMarker.point.getLatitude(), mapMarker.point.getLongitude(), - mapMarker.pointDescription, mapMarker.colorIndex, mapMarker.pos); + mapMarker.pointDescription, mapMarker.colorIndex, mapMarker.pos, mapMarker.selected); } updateMarker(mapMarker); } @@ -253,6 +252,7 @@ public class MapMarkersHelper { List pointDescriptions = new ArrayList<>(); int[] colorIndexes = new int[points.size()]; int[] positions = new int[points.size()]; + boolean[] selections = new boolean[points.size()]; int[] indexes = new int[points.size()]; for (int i = 0; i < points.size(); i++) { LatLon point = points.get(i); @@ -280,14 +280,19 @@ public class MapMarkersHelper { longitudes[i] = point.getLongitude(); pointDescriptions.add(pointDescription); colorIndexes[i] = colorIndex; - positions[i] = 0 - i; + positions[i] = -1 - i; + selections[i] = false; indexes[i] = 0; } + /* if (sortedMapMarkers.size() > 0) { MapMarker firstMarker = sortedMapMarkers.get(0); - settings.updateMapMarker(firstMarker.getLatitude(), firstMarker.getLongitude(), firstMarker.pointDescription, firstMarker.colorIndex, -points.size()); + settings.updateMapMarker(firstMarker.getLatitude(), firstMarker.getLongitude(), + firstMarker.pointDescription, firstMarker.colorIndex, -points.size(), firstMarker.selected); } - settings.insertMapMarkers(latitudes, longitudes, pointDescriptions, colorIndexes, positions, indexes); + */ + settings.insertMapMarkers(latitudes, longitudes, pointDescriptions, colorIndexes, positions, + selections, indexes); readFromSettings(); normalizePositions(); } @@ -323,13 +328,15 @@ public class MapMarkersHelper { List names = new ArrayList<>(markers.size()); List colors = new ArrayList<>(markers.size()); List positions = new ArrayList<>(markers.size()); + List selections = new ArrayList<>(markers.size()); for (MapMarker marker : markers) { ls.add(marker.point); names.add(PointDescription.serializeToString(marker.pointDescription)); colors.add(marker.colorIndex); positions.add(marker.pos); + selections.add(marker.selected); } - settings.saveMapMarkers(ls, names, colors, positions); + settings.saveMapMarkers(ls, names, colors, positions, selections); } if (markersHistory != null) { diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java index 62eca11c84..0aa2735f13 100644 --- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java @@ -1520,8 +1520,8 @@ public class OsmandSettings { public final static String MAP_MARKERS_COLOR = "map_markers_color"; //$NON-NLS-1$ public final static String MAP_MARKERS_DESCRIPTION = "map_markers_description"; //$NON-NLS-1$ public final static String MAP_MARKERS_POSITION = "map_markers_position"; //$NON-NLS-1$ + public final static String MAP_MARKERS_SELECTION = "map_markers_selection"; //$NON-NLS-1$ public final static String MAP_MARKERS_HISTORY_POINT = "map_markers_history_point"; //$NON-NLS-1$ - public final static String MAP_MARKERS_HISTORY_COLOR = "map_markers_history_color"; //$NON-NLS-1$ public final static String MAP_MARKERS_HISTORY_DESCRIPTION = "map_markers_history_description"; //$NON-NLS-1$ public final static int MAP_MARKERS_HISTORY_LIMIT = 30; private MapMarkersStorage mapMarkersStorage = new MapMarkersStorage(); @@ -1576,6 +1576,7 @@ public class OsmandSettings { .remove(MAP_MARKERS_DESCRIPTION) .remove(MAP_MARKERS_COLOR) .remove(MAP_MARKERS_POSITION) + .remove(MAP_MARKERS_SELECTION) .commit(); } @@ -1583,7 +1584,6 @@ public class OsmandSettings { return settingsAPI.edit(globalPreferences) .remove(MAP_MARKERS_HISTORY_POINT) .remove(MAP_MARKERS_HISTORY_DESCRIPTION) - .remove(MAP_MARKERS_HISTORY_COLOR) .commit(); } @@ -1599,22 +1599,11 @@ public class OsmandSettings { } } - private class MapMarkersHistoryStorage extends MapMarkersStorage { + private class MapMarkersHistoryStorage extends MapPointsStorage { public MapMarkersHistoryStorage() { pointsKey = MAP_MARKERS_HISTORY_POINT; descriptionsKey = MAP_MARKERS_HISTORY_DESCRIPTION; - colorsKey = MAP_MARKERS_HISTORY_COLOR; - } - - @Override - public boolean savePoints(List ps, List ds, List cs, List ns) { - if (ps.size() > MAP_MARKERS_HISTORY_LIMIT) { - ps.remove(ps.size() - 1); - ds.remove(ds.size() - 1); - cs.remove(cs.size() - 1); - } - return super.savePoints(ps, ds, cs, ns); } } @@ -1622,12 +1611,14 @@ public class OsmandSettings { protected String colorsKey; protected String posKey; + protected String selectionKey; public MapMarkersStorage() { pointsKey = MAP_MARKERS_POINT; descriptionsKey = MAP_MARKERS_DESCRIPTION; colorsKey = MAP_MARKERS_COLOR; posKey = MAP_MARKERS_POSITION; + selectionKey = MAP_MARKERS_SELECTION; } public List getColors(int sz) { @@ -1640,79 +1631,130 @@ public class OsmandSettings { list.add(Integer.parseInt(colorStr)); } } + while (list.size() > sz) { + list.remove(list.size() - 1); + } + int i = 0; + while (list.size() < sz) { + list.add(i % MapMarkersHelper.MAP_MARKERS_COLORS_COUNT); + i++; + } return list; } public List getPositions(int sz) { List list = new ArrayList<>(); + int pos = 0; String ip = settingsAPI.getString(globalPreferences, posKey, ""); if (ip.trim().length() > 0) { StringTokenizer tok = new StringTokenizer(ip, ","); while (tok.hasMoreTokens()) { String indexStr = tok.nextToken(); - list.add(Integer.parseInt(indexStr)); + int p = Integer.parseInt(indexStr); + list.add(p); + if (p > pos) { + pos = p; + } } } + while (list.size() > sz) { + list.remove(list.size() - 1); + } + while (list.size() < sz) { + list.add(++pos); + } + return list; + } + + public List getSelections(int sz) { + List list = new ArrayList<>(); + String ip = settingsAPI.getString(globalPreferences, selectionKey, ""); + if (ip.trim().length() > 0) { + StringTokenizer tok = new StringTokenizer(ip, ","); + while (tok.hasMoreTokens()) { + String indexStr = tok.nextToken(); + list.add(Boolean.parseBoolean(indexStr)); + } + } + while (list.size() > sz) { + list.remove(list.size() - 1); + } + while (list.size() < sz) { + list.add(false); + } return list; } public boolean insertPoint(double latitude, double longitude, - PointDescription historyDescription, int colorIndex, int pos, int index) { + PointDescription historyDescription, int colorIndex, int pos, + boolean selected, int index) { List ps = getPoints(); List ds = getPointDescriptions(ps.size()); List cs = getColors(ps.size()); List ns = getPositions(ps.size()); + List bs = getSelections(ps.size()); ps.add(index, new LatLon(latitude, longitude)); ds.add(index, PointDescription.serializeToString(historyDescription)); cs.add(index, colorIndex); ns.add(index, pos); + bs.add(index, selected); if (historyDescription != null && !historyDescription.isSearchingAddress(ctx)) { SearchHistoryHelper.getInstance(ctx).addNewItemToHistory(latitude, longitude, historyDescription); } - return savePoints(ps, ds, cs, ns); + return savePoints(ps, ds, cs, ns, bs); } public boolean insertPoints(double[] latitudes, double[] longitudes, List historyDescriptions, int[] colorIndexes, - int[] positions, int[] indexes) { + int[] positions, boolean[] selections, int[] indexes) { List ps = getPoints(); List ds = getPointDescriptions(ps.size()); List cs = getColors(ps.size()); List ns = getPositions(ps.size()); + List bs = getSelections(ps.size()); for (int i = 0; i < latitudes.length; i++) { double latitude = latitudes[i]; double longitude = longitudes[i]; PointDescription historyDescription = historyDescriptions.get(i); int colorIndex = colorIndexes[i]; int pos = positions[i]; + boolean selected = selections[i]; int index = indexes[i]; ps.add(index, new LatLon(latitude, longitude)); ds.add(index, PointDescription.serializeToString(historyDescription)); cs.add(index, colorIndex); ns.add(index, pos); + bs.add(index, selected); if (historyDescription != null && !historyDescription.isSearchingAddress(ctx)) { SearchHistoryHelper.getInstance(ctx).addNewItemToHistory(latitude, longitude, historyDescription); } } - return savePoints(ps, ds, cs, ns); + return savePoints(ps, ds, cs, ns, bs); } public boolean updatePoint(double latitude, double longitude, - PointDescription historyDescription, int colorIndex, int pos) { + PointDescription historyDescription, int colorIndex, + int pos, boolean selected) { List ps = getPoints(); List ds = getPointDescriptions(ps.size()); List cs = getColors(ps.size()); List ns = getPositions(ps.size()); + List bs = getSelections(ps.size()); int index = ps.indexOf(new LatLon(latitude, longitude)); ds.set(index, PointDescription.serializeToString(historyDescription)); - cs.set(index, colorIndex); + if (cs.size() > index) { + cs.set(index, colorIndex); + } if (ns.size() > index) { ns.set(index, pos); } + if (bs.size() > index) { + bs.set(index, selected); + } if (historyDescription != null && !historyDescription.isSearchingAddress(ctx)) { SearchHistoryHelper.getInstance(ctx).addNewItemToHistory(latitude, longitude, historyDescription); } - return savePoints(ps, ds, cs, ns); + return savePoints(ps, ds, cs, ns, bs); } @Override @@ -1721,6 +1763,7 @@ public class OsmandSettings { List ds = getPointDescriptions(ps.size()); List cs = getColors(ps.size()); List ns = getPositions(ps.size()); + List bs = getSelections(ps.size()); ps.remove(index); ds.remove(index); if (cs.size() > index) { @@ -1729,10 +1772,14 @@ public class OsmandSettings { if (ns.size() > index) { ns.remove(index); } - return savePoints(ps, ds, cs, ns); + if (bs.size() > index) { + bs.remove(index); + } + return savePoints(ps, ds, cs, ns, bs); } - public boolean savePoints(List ps, List ds, List cs, List ns) { + public boolean savePoints(List ps, List ds, List cs, + List ns, List bs) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < ps.size(); i++) { if (i > 0) { @@ -1767,11 +1814,21 @@ public class OsmandSettings { nb.append(Integer.toString(ns.get(i))); } } + StringBuilder bb = new StringBuilder(); + if (bs != null) { + for (int i = 0; i < bs.size(); i++) { + if (i > 0) { + bb.append(","); + } + bb.append(Boolean.toString(bs.get(i))); + } + } return settingsAPI.edit(globalPreferences) .putString(pointsKey, sb.toString()) .putString(descriptionsKey, tb.toString()) .putString(colorsKey, cb.toString()) .putString(posKey, nb.toString()) + .putString(selectionKey, bb.toString()) .commit(); } @@ -1925,33 +1982,42 @@ public class OsmandSettings { return mapMarkersStorage.getPositions(sz); } + public List getMapMarkersSelections(int sz) { + return mapMarkersStorage.getSelections(sz); + } + public List getMapMarkersPoints() { return mapMarkersStorage.getPoints(); } public boolean insertMapMarker(double latitude, double longitude, - PointDescription historyDescription, int colorIndex, int pos, int index) { - return mapMarkersStorage.insertPoint(latitude, longitude, historyDescription, colorIndex, index, pos); + PointDescription historyDescription, int colorIndex, int pos, + boolean selected, int index) { + return mapMarkersStorage.insertPoint(latitude, longitude, historyDescription, colorIndex, + index, selected, pos); } public boolean insertMapMarkers(double[] latitudes, double[] longitudes, List historyDescriptions, int[] colorIndexes, - int[] positions, int[] indexes) { + int[] positions, boolean[] selections, int[] indexes) { return mapMarkersStorage.insertPoints(latitudes, longitudes, historyDescriptions, colorIndexes, - positions, indexes); + positions, selections, indexes); } public boolean updateMapMarker(double latitude, double longitude, - PointDescription historyDescription, int colorIndex, int pos) { - return mapMarkersStorage.updatePoint(latitude, longitude, historyDescription, colorIndex, pos); + PointDescription historyDescription, int colorIndex, + int pos, boolean selected) { + return mapMarkersStorage.updatePoint(latitude, longitude, historyDescription, colorIndex, + pos, selected); } public boolean deleteMapMarker(int index) { return mapMarkersStorage.deletePoint(index); } - public boolean saveMapMarkers(List ps, List ds, List cs, List ns) { - return mapMarkersStorage.savePoints(ps, ds, cs, ns); + public boolean saveMapMarkers(List ps, List ds, List cs, List ns, + List bs) { + return mapMarkersStorage.savePoints(ps, ds, cs, ns, bs); } @@ -1959,22 +2025,18 @@ public class OsmandSettings { return mapMarkersHistoryStorage.getPointDescriptions(sz); } - public List getMapMarkersHistoryColors(int sz) { - return mapMarkersHistoryStorage.getColors(sz); - } - public List getMapMarkersHistoryPoints() { return mapMarkersHistoryStorage.getPoints(); } public boolean insertMapMarkerHistory(double latitude, double longitude, PointDescription historyDescription, int colorIndex, int index) { - return mapMarkersHistoryStorage.insertPoint(latitude, longitude, historyDescription, colorIndex, index, 0); + return mapMarkersHistoryStorage.insertPoint(latitude, longitude, historyDescription, index); } public boolean updateMapMarkerHistory(double latitude, double longitude, PointDescription historyDescription, int colorIndex) { - return mapMarkersHistoryStorage.updatePoint(latitude, longitude, historyDescription, colorIndex, 0); + return mapMarkersHistoryStorage.updatePoint(latitude, longitude, historyDescription); } public boolean deleteMapMarkerHistory(int index) { @@ -1982,7 +2044,7 @@ public class OsmandSettings { } public boolean saveMapMarkersHistory(List ps, List ds, List cs) { - return mapMarkersHistoryStorage.savePoints(ps, ds, cs, null); + return mapMarkersHistoryStorage.savePoints(ps, ds); } diff --git a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java index d39636fbee..e6bfdc68b4 100644 --- a/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java +++ b/OsmAnd/src/net/osmand/plus/dashboard/DashboardOnMap.java @@ -208,9 +208,6 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis //listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE); listView.setDrawSelectorOnTop(true); ((DynamicListView) listView).setDynamicListViewCallbacks(this); - listView.setOverscrollFooter(new ColorDrawable( - nightMode ? mapActivity.getResources().getColor(R.color.ctx_menu_info_view_bg_dark) - : mapActivity.getResources().getColor(R.color.ctx_menu_info_view_bg_light))); // Create a ListView-specific touch listener. ListViews are given special treatment because // by default they handle touches for their list items... i.e. they're in charge of drawing @@ -779,6 +776,11 @@ public class DashboardOnMap implements ObservableScrollViewCallbacks, DynamicLis listView.setDivider(null); } } + /* + listView.setOverscrollFooter(new ColorDrawable( + nightMode ? mapActivity.getResources().getColor(R.color.ctx_menu_info_view_bg_dark) + : mapActivity.getResources().getColor(R.color.ctx_menu_info_view_bg_light))); + */ } private int dpToPx(float dp) { diff --git a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java index 109d2536c9..57e6a264a8 100644 --- a/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java +++ b/OsmAnd/src/net/osmand/plus/helpers/MapMarkerDialogHelper.java @@ -14,6 +14,7 @@ import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; +import android.widget.CheckBox; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.ListView; @@ -63,6 +64,7 @@ public class MapMarkerDialogHelper { private MapMarkersDialogHelperCallbacks helperCallbacks; private boolean sorted; private boolean nightMode; + private boolean selectionMode; private boolean useCenter; private LatLon loc; @@ -73,6 +75,7 @@ public class MapMarkerDialogHelper { public interface MapMarkersDialogHelperCallbacks { void reloadAdapter(); + void deleteMapMarker(int position); } @@ -86,6 +89,14 @@ public class MapMarkerDialogHelper { this.helperCallbacks = helperCallbacks; } + public boolean isSelectionMode() { + return selectionMode; + } + + public void setSelectionMode(boolean selectionMode) { + this.selectionMode = selectionMode; + } + public boolean isNightMode() { return nightMode; } @@ -331,7 +342,8 @@ public class MapMarkerDialogHelper { if (v == null || v.findViewById(R.id.info_close) == null) { v = mapActivity.getLayoutInflater().inflate(R.layout.map_marker_item, null); } - updateMapMarkerInfoView(mapActivity, v, loc, heading, useCenter, nightMode, screenOrientation, marker); + updateMapMarkerInfoView(mapActivity, v, loc, heading, useCenter, nightMode, screenOrientation, + selectionMode, marker); final View more = v.findViewById(R.id.all_points); final View move = v.findViewById(R.id.info_move); final View remove = v.findViewById(R.id.info_close); @@ -372,8 +384,9 @@ public class MapMarkerDialogHelper { } public static void updateMapMarkerInfoView(Context ctx, View localView, LatLon loc, - Float heading, boolean useCenter, boolean nightMode, - int screenOrientation, final MapMarker marker) { + Float heading, boolean useCenter, boolean nightMode, + int screenOrientation, boolean selectionMode, + final MapMarker marker) { TextView text = (TextView) localView.findViewById(R.id.waypoint_text); TextView textShadow = (TextView) localView.findViewById(R.id.waypoint_text_shadow); TextView textDist = (TextView) localView.findViewById(R.id.waypoint_dist); @@ -381,10 +394,13 @@ public class MapMarkerDialogHelper { ImageView waypointIcon = (ImageView) localView.findViewById(R.id.waypoint_icon); TextView waypointDeviation = (TextView) localView.findViewById(R.id.waypoint_deviation); TextView descText = (TextView) localView.findViewById(R.id.waypoint_desc_text); + CheckBox checkBox = (CheckBox) localView.findViewById(R.id.checkbox); + if (text == null || textDist == null || arrow == null || waypointIcon == null || waypointDeviation == null || descText == null) { return; } + float[] mes = new float[2]; if (loc != null && marker.point != null) { Location.distanceBetween(marker.getLatitude(), marker.getLongitude(), loc.getLatitude(), loc.getLongitude(), mes); @@ -447,6 +463,13 @@ public class MapMarkerDialogHelper { text.setText(descr); descText.setVisibility(View.GONE); + + if (selectionMode) { + checkBox.setVisibility(View.VISIBLE); + } else { + checkBox.setVisibility(View.GONE); + } + /* String pointDescription = ""; if (descText != null) { @@ -661,7 +684,8 @@ public class MapMarkerDialogHelper { Object obj = listView.getItemAtPosition(i); View v = listView.getChildAt(i - listView.getFirstVisiblePosition()); if (obj == marker) { - updateMapMarkerInfoView(mapActivity, v, loc, heading, useCenter, nightMode, screenOrientation, marker); + updateMapMarkerInfoView(mapActivity, v, loc, heading, useCenter, nightMode, + screenOrientation, selectionMode, marker); } } } catch (Exception e) { diff --git a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java index b795a99e2e..ea0c19fb46 100644 --- a/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapmarkers/MapMarkerSelectionFragment.java @@ -120,7 +120,7 @@ public class MapMarkerSelectionFragment extends BaseOsmAndDialogFragment { convertView = getMapActivity().getLayoutInflater().inflate(R.layout.map_marker_item, null); } MapMarkerDialogHelper.updateMapMarkerInfoView(getContext(), convertView, loc, heading, - useCenter, nightMode, screenOrientation, marker); + useCenter, nightMode, screenOrientation, false, marker); final View remove = convertView.findViewById(R.id.info_close); remove.setVisibility(View.GONE); AndroidUtils.setListItemBackground(getMapActivity(), convertView, nightMode);