修复了Marker展示内容过多的问题

This commit is contained in:
董宏宇
2020-01-15 14:44:56 +08:00
parent e7aa921dfa
commit 2a297ae83f
2 changed files with 8 additions and 3 deletions

View File

@@ -125,7 +125,13 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
break;
}
if (!TextUtils.isEmpty(markerShowEntity.getTextContent())) {
tvMarkerContent.setText(markerShowEntity.getTextContent());
String content;
if (markerShowEntity.getTextContent().length() > 8) {
content = markerShowEntity.getTextContent().substring(0, 7) + "...";
} else {
content = markerShowEntity.getTextContent();
}
tvMarkerContent.setText(content);
}
} catch (Exception e) {