From de732bc2b8309d0c9fd4efeb458f1d298b1231f0 Mon Sep 17 00:00:00 2001 From: Dmitry Yunitsky Date: Fri, 25 Mar 2016 18:23:07 +0300 Subject: [PATCH] [android] Fixed empty text in routing slot when MapObject has no title. --- android/src/com/mapswithme/maps/routing/SlotFrame.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/com/mapswithme/maps/routing/SlotFrame.java b/android/src/com/mapswithme/maps/routing/SlotFrame.java index 71da5fa15b..e6f0dfd134 100644 --- a/android/src/com/mapswithme/maps/routing/SlotFrame.java +++ b/android/src/com/mapswithme/maps/routing/SlotFrame.java @@ -7,6 +7,7 @@ import android.graphics.Rect; import android.os.Build; import android.support.annotation.IdRes; import android.support.annotation.NonNull; +import android.text.TextUtils; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; @@ -99,7 +100,7 @@ public class SlotFrame extends LinearLayout if (MapObject.isOfType(MapObject.MY_POSITION, mMapObject)) mText.setText(R.string.p2p_your_location); else - mText.setText(mMapObject.getTitle()); + mText.setText(!TextUtils.isEmpty(mMapObject.getTitle()) ? mMapObject.getTitle() : mMapObject.getSubtitle()); mText.setTextColor(mTextColor); }