forked from organicmaps/organicmaps
[android] fix: Show more relevant map info in route planning.
This commit is contained in:
parent
9e24e2d71b
commit
16d533535c
1 changed files with 12 additions and 1 deletions
|
@ -100,7 +100,18 @@ public class SlotFrame extends LinearLayout
|
|||
if (MapObject.isOfType(MapObject.MY_POSITION, mMapObject))
|
||||
mText.setText(R.string.p2p_your_location);
|
||||
else
|
||||
mText.setText(!TextUtils.isEmpty(mMapObject.getTitle()) ? mMapObject.getTitle() : mMapObject.getSubtitle());
|
||||
{
|
||||
String text = mMapObject.getTitle();
|
||||
if (TextUtils.isEmpty(text))
|
||||
{
|
||||
text = mMapObject.getAddress();
|
||||
|
||||
if (TextUtils.isEmpty(text))
|
||||
text = mMapObject.getSubtitle();
|
||||
}
|
||||
|
||||
mText.setText(text);
|
||||
}
|
||||
|
||||
mText.setTextColor(mTextColor);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue