diff --git a/OsmAnd/assets/article_style.css b/OsmAnd/assets/article_style.css index f8df7b24ab..0f1fe9df41 100755 --- a/OsmAnd/assets/article_style.css +++ b/OsmAnd/assets/article_style.css @@ -75,6 +75,7 @@ h3 { font-size: 1.2em; font-family: sans-serif; word-wrap: break-word; + font-weight: normal; margin-top: 3%; margin-bottom: 3%; } diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index 6f6af77a73..14cf1d20ea 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -1290,8 +1290,10 @@ public class GPXUtilities { } serializer.endTag(null, "gpx"); //$NON-NLS-1$ - serializer.flush(); serializer.endDocument(); + serializer.flush(); + + } catch (RuntimeException e) { log.error("Error saving gpx", e); //$NON-NLS-1$ return ctx.getString(R.string.error_occurred_saving_gpx); diff --git a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java index 619e94fb85..90156b2943 100644 --- a/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/wikivoyage/article/WikivoyageArticleDialogFragment.java @@ -158,7 +158,9 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen }); + final GPXFile gpx = article.getGpxFile(); TextView trackButton = (TextView) mainView.findViewById(R.id.gpx_button); + trackButton.setText(trackButton.getText() + " (" + gpx.getPoints().size() +")"); trackButton.setCompoundDrawablesWithIntrinsicBounds( getActiveIcon(R.drawable.ic_action_track_16), null, null, null ); @@ -171,7 +173,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen } WikivoyageDbHelper dbHelper = getMyApplication().getWikivoyageDbHelper(); File file = getMyApplication().getAppPath(IndexConstants.GPX_TRAVEL_DIR + dbHelper.getGPXName(article)); - GPXFile gpx = article.getGpxFile(); + GPXUtilities.writeGpxFile(file, gpx, getMyApplication()); Bundle args = new Bundle(); args.putString(WikivoyageArticleContentsFragment.CONTENTS_JSON_KEY, article.getContentsJson());