diff --git a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java index 06e71c1bfd..823cb4b740 100644 --- a/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java +++ b/OsmAnd/src/net/osmand/plus/activities/FavoritesTreeFragment.java @@ -89,6 +89,8 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen public static final int IMPORT_FAVOURITES_ID = 7; public static final String GROUP_EXPANDED_POSTFIX = "_group_expanded"; + private static final int MAX_POINTS_IN_DESCRIPTION = 100; + private FavouritesAdapter favouritesAdapter; private FavouritesDbHelper helper; @@ -611,23 +613,28 @@ public class FavoritesTreeFragment extends OsmandExpandableListFragment implemen StringBuilder html = new StringBuilder(); html.append("

My Favorites

"); - int MAX_AMOUNT_OF_POINTS = 100; int addedPoints = 0; for (FavoriteGroup group : groups) { - html.append("

" + group.getDisplayName(app) + "

"); + html.append("

").append(group.getDisplayName(app)).append("

"); for (FavouritePoint fp : group.getPoints()) { - if (addedPoints >= MAX_AMOUNT_OF_POINTS) { + if (addedPoints >= MAX_POINTS_IN_DESCRIPTION) { break; } float lat = (float) fp.getLatitude(); float lon = (float) fp.getLongitude(); String url = "geo:" + lat + "," + lon + "?m=" + fp.getName(); - html.append("

" + fp.getDisplayName(app) + " - geo:" - + lat + "," + lon + "

"); + html.append("

") + .append(fp.getDisplayName(app)) + .append(" - geo:") + .append(lat).append(",").append(lon) + .append("

"); addedPoints++; } - if (addedPoints >= MAX_AMOUNT_OF_POINTS) { + + if (addedPoints >= MAX_POINTS_IN_DESCRIPTION) { html.append("

...

"); break; }