Show title in all builders

This commit is contained in:
PavelRatushny 2017-10-03 12:45:49 +03:00
parent 5d1c0a5c7d
commit dc664c131e
4 changed files with 32 additions and 0 deletions

View file

@ -56,6 +56,14 @@ public class AmenityMenuBuilder extends MenuBuilder {
protected void buildNearestWikiRow(View view) {
}
@Override
protected void buildTitleRow(View view) {
String title = mapActivity.getContextMenu().getTitleStr();
if (title.length() > 60) {
buildRow(view, R.drawable.ic_action_note_dark, title, 0, false, null, false, 0, false, null);
}
}
private void buildRow(View view, int iconId, String text, String textPrefix,
boolean collapsable, final CollapsableView collapsableView,
int textColor, boolean isWiki, boolean isText, boolean needLinks,

View file

@ -38,6 +38,14 @@ public class GpxItemMenuBuilder extends MenuBuilder {
}
}
@Override
protected void buildTitleRow(View view) {
String title = mapActivity.getContextMenu().getTitleStr();
if (title.length() > 60) {
buildRow(view, R.drawable.ic_action_note_dark, title, 0, false, null, false, 0, false, null);
}
}
@Override
public boolean hasCustomAddressLine() {
return true;

View file

@ -29,6 +29,14 @@ public class WptPtMenuBuilder extends MenuBuilder {
return false;
}
@Override
protected void buildTitleRow(View view) {
String title = mapActivity.getContextMenu().getTitleStr();
if (title.length() > 60) {
buildRow(view, R.drawable.ic_action_note_dark, title, 0, false, null, false, 0, false, null);
}
}
@Override
public void buildInternal(View view) {
if (wpt.time > 0) {

View file

@ -25,6 +25,14 @@ public class EditPOIMenuBuilder extends MenuBuilder {
return false;
}
@Override
protected void buildTitleRow(View view) {
String title = mapActivity.getContextMenu().getTitleStr();
if (title.length() > 60) {
buildRow(view, R.drawable.ic_action_note_dark, title, 0, false, null, false, 0, false, null);
}
}
@Override
public void buildInternal(View view) {
if (osmPoint instanceof OsmNotesPoint) {