implement legend via web page

This commit is contained in:
sonora 2015-11-08 02:13:47 +01:00
parent 65a293761d
commit 822f25d8f8
2 changed files with 12 additions and 10 deletions

View file

@ -2056,5 +2056,5 @@ Afghanistan, Albania, Algeria, Andorra, Angola, Anguilla, Antigua and Barbuda, A
<string name="feedback">Feedback</string>
<string name="contact_us">Contact us</string>
<string name="map_legend">Map legend</string>
<string name="map_legend_item_description">Legend for OsmAnd default map style, Internet connectivity needed to display</string>
<!-- string name="map_legend_item_description">Legend for OsmAnd default map style, Internet connectivity needed to display</string -->
</resources>

View file

@ -140,15 +140,17 @@ public class HelpActivity extends OsmandActionBarActivity {
"feature_articles/find-something-on-map.html", getActivity()));
arrayList.add(new HelpMenuItem(R.string.planning_trip_item, -1, -1,
"feature_articles/trip-planning.html", getActivity()));
final String legendName = getActivity().getString(R.string.map_legend);
View.OnClickListener onClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
HelpArticleDialogFragment.instantiateWithUrl(OSMAND_MAP_LEGEND, legendName)
.show(getFragmentManager(), null);
}
};
arrayList.add(new HelpMenuItem(legendName, getActivity().getString(R.string.map_legend_item_description), onClickListener));
//final String legendName = getActivity().getString(R.string.map_legend);
//View.OnClickListener onClickListener = new View.OnClickListener() {
// @Override
// public void onClick(View v) {
// HelpArticleDialogFragment.instantiateWithUrl(OSMAND_MAP_LEGEND, legendName)
// .show(getFragmentManager(), null);
// }
//};
//arrayList.add(new HelpMenuItem(legendName, getActivity().getString(R.string.map_legend_item_description), onClickListener));
arrayList.add(new HelpMenuItem(R.string.map_legend, -1, -1,
"feature_articles/map-legend.html", getActivity()));
return arrayList;
}