Update gpx open
This commit is contained in:
parent
6a33b5f89a
commit
2843126682
3 changed files with 7 additions and 2 deletions
|
@ -75,6 +75,7 @@ h3 {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
font-weight: normal;
|
||||||
margin-top: 3%;
|
margin-top: 3%;
|
||||||
margin-bottom: 3%;
|
margin-bottom: 3%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1290,8 +1290,10 @@ public class GPXUtilities {
|
||||||
}
|
}
|
||||||
|
|
||||||
serializer.endTag(null, "gpx"); //$NON-NLS-1$
|
serializer.endTag(null, "gpx"); //$NON-NLS-1$
|
||||||
serializer.flush();
|
|
||||||
serializer.endDocument();
|
serializer.endDocument();
|
||||||
|
serializer.flush();
|
||||||
|
|
||||||
|
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
log.error("Error saving gpx", e); //$NON-NLS-1$
|
log.error("Error saving gpx", e); //$NON-NLS-1$
|
||||||
return ctx.getString(R.string.error_occurred_saving_gpx);
|
return ctx.getString(R.string.error_occurred_saving_gpx);
|
||||||
|
|
|
@ -158,7 +158,9 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
final GPXFile gpx = article.getGpxFile();
|
||||||
TextView trackButton = (TextView) mainView.findViewById(R.id.gpx_button);
|
TextView trackButton = (TextView) mainView.findViewById(R.id.gpx_button);
|
||||||
|
trackButton.setText(trackButton.getText() + " (" + gpx.getPoints().size() +")");
|
||||||
trackButton.setCompoundDrawablesWithIntrinsicBounds(
|
trackButton.setCompoundDrawablesWithIntrinsicBounds(
|
||||||
getActiveIcon(R.drawable.ic_action_track_16), null, null, null
|
getActiveIcon(R.drawable.ic_action_track_16), null, null, null
|
||||||
);
|
);
|
||||||
|
@ -171,7 +173,7 @@ public class WikivoyageArticleDialogFragment extends WikivoyageBaseDialogFragmen
|
||||||
}
|
}
|
||||||
WikivoyageDbHelper dbHelper = getMyApplication().getWikivoyageDbHelper();
|
WikivoyageDbHelper dbHelper = getMyApplication().getWikivoyageDbHelper();
|
||||||
File file = getMyApplication().getAppPath(IndexConstants.GPX_TRAVEL_DIR + dbHelper.getGPXName(article));
|
File file = getMyApplication().getAppPath(IndexConstants.GPX_TRAVEL_DIR + dbHelper.getGPXName(article));
|
||||||
GPXFile gpx = article.getGpxFile();
|
|
||||||
GPXUtilities.writeGpxFile(file, gpx, getMyApplication());
|
GPXUtilities.writeGpxFile(file, gpx, getMyApplication());
|
||||||
Bundle args = new Bundle();
|
Bundle args = new Bundle();
|
||||||
args.putString(WikivoyageArticleContentsFragment.CONTENTS_JSON_KEY, article.getContentsJson());
|
args.putString(WikivoyageArticleContentsFragment.CONTENTS_JSON_KEY, article.getContentsJson());
|
||||||
|
|
Loading…
Reference in a new issue