From d50e7a75b4ccc18ed51a55ee75092d0b4bc25841 Mon Sep 17 00:00:00 2001 From: Kazing <41507326+Kazing@users.noreply.github.com> Date: Sun, 14 Nov 2021 10:48:00 +0100 Subject: [PATCH] [android] modified PlacePageView to fix hotel subtitles color (#1547) * modified PlacePageView setspan to fix hotel subtitles color Signed-off-by: Thibaud Besnard * corrected my fix after test on debug apk Signed-off-by: Thibaud Besnard * typo Signed-off-by: Thibaud Besnard * typo again Signed-off-by: Thibaud Besnard --- .../com/mapswithme/maps/widget/placepage/PlacePageView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java index 715259962e..f5c2602c94 100644 --- a/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java +++ b/android/src/com/mapswithme/maps/widget/placepage/PlacePageView.java @@ -826,10 +826,11 @@ public class PlacePageView extends NestedScrollViewClickFixed { SpannableStringBuilder sb = new SpannableStringBuilder(text); int start = text.indexOf("★"); + int end = text.lastIndexOf("★") + 1; if (start > -1) { sb.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.base_yellow)), - start, sb.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE); + start, end, Spanned.SPAN_INCLUSIVE_EXCLUSIVE); } mTvSubtitle.setText(sb);