forked from organicmaps/organicmaps
[android] modified PlacePageView to fix hotel subtitles color (#1547)
* modified PlacePageView setspan to fix hotel subtitles color Signed-off-by: Thibaud Besnard <thibaudk@posteo.net> * corrected my fix after test on debug apk Signed-off-by: Thibaud Besnard <thibaudk@posteo.net> * typo Signed-off-by: Thibaud Besnard <thibaudk@posteo.net> * typo again Signed-off-by: Thibaud Besnard <thibaudk@posteo.net>
This commit is contained in:
parent
941e574896
commit
d50e7a75b4
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue