File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
library/src/main/java/com/google/maps/android/data Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -1156,21 +1156,21 @@ public View getInfoWindow(@NonNull Marker marker) {
11561156
11571157 @ Override
11581158 public View getInfoContents (@ NonNull Marker marker ) {
1159- if (marker .getTitle () == null ) {
1159+ String title = marker .getTitle ();
1160+ if (title == null ) {
11601161 return null ;
11611162 }
11621163
11631164 View view = LayoutInflater .from (mContext ).inflate (R .layout .amu_info_window , null );
11641165 TextView infoWindowText = view .findViewById (R .id .window );
11651166
1166- String title = marker .getTitle ();
1167- String snippet = marker .getSnippet ();
1167+ StringBuilder infoText = new StringBuilder (title );
11681168
1169+ String snippet = marker .getSnippet ();
11691170 if (snippet != null ) {
1170- infoWindowText .setText (Html .fromHtml (title + "<br>" + snippet ));
1171- } else {
1172- infoWindowText .setText (Html .fromHtml (title ));
1171+ infoText .append ("<br>" ).append (snippet );
11731172 }
1173+ infoWindowText .setText (Html .fromHtml (infoText .toString ()));
11741174
11751175 return view ;
11761176 }
You can’t perform that action at this time.
0 commit comments