From 9c7438cb69ba0cf7aeb25909f35ff5a8ea991e1f Mon Sep 17 00:00:00 2001 From: hemanggs Date: Sun, 23 Feb 2025 18:01:13 +0530 Subject: [PATCH] [android] RoutingErrorDialogFragment dialog fix Signed-off-by: hemanggs --- .../routing/RoutingErrorDialogFragment.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/app/organicmaps/routing/RoutingErrorDialogFragment.java b/android/app/src/main/java/app/organicmaps/routing/RoutingErrorDialogFragment.java index 961abdca58..9feac460a5 100644 --- a/android/app/src/main/java/app/organicmaps/routing/RoutingErrorDialogFragment.java +++ b/android/app/src/main/java/app/organicmaps/routing/RoutingErrorDialogFragment.java @@ -2,10 +2,13 @@ package app.organicmaps.routing; import android.content.Context; import android.content.DialogInterface; +import android.graphics.Typeface; import android.os.Bundle; +import android.text.TextUtils; import android.util.Pair; import android.view.View; import android.widget.Button; +import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -35,7 +38,15 @@ public class RoutingErrorDialogFragment extends BaseRoutingErrorDialogFragment ResultCodesHelper.getDialogTitleSubtitle(requireContext(), mResultCode, mMissingMaps.size()); Pair titleMessage = resHolder.getTitleMessage(); - builder.setTitle(titleMessage.first); + TextView titleView = new TextView(requireContext()); + titleView.setText(titleMessage.first); + titleView.setPadding(65, 32, 32, 16); + titleView.setTextSize(18); + titleView.setMaxLines(4); + titleView.setEllipsize(TextUtils.TruncateAt.END); + titleView.setTypeface(null, Typeface.BOLD); + builder.setCustomTitle(titleView); + mMessage = titleMessage.second; builder.setNegativeButton(resHolder.getCancelBtnResId(), null); if (ResultCodesHelper.isDownloadable(mResultCode, mMissingMaps.size()))