修复了Marker展示内容过多的问题
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:maxLength="8"
|
||||
android:singleLine="true"
|
||||
android:textColor="#ffffff"
|
||||
android:textSize="@dimen/sp_32"
|
||||
@@ -66,7 +65,7 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/ivUserHead"
|
||||
app:layout_constraintTop_toTopOf="@+id/ivUserHead"
|
||||
tools:text="诗一样的女子诗诗一样的女子诗诗一样的女子诗" />
|
||||
tools:text="诗一样的女子" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout >
|
||||
|
||||
<ImageView
|
||||
|
||||
Reference in New Issue
Block a user