[android] fix: Show more relevant map info in route planning.

This commit is contained in:
Alexander Marchuk 2016-04-27 20:50:21 +03:00 committed by Alex Zolotarev
parent 9e24e2d71b
commit 16d533535c

View file

@ -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);
}