mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[android]: Fixed the appearance of an extra margin in the dialog when there is no title.
Also, add a tools:text attribute to the dialog_missed_maps.xml layout for better preview in Android Studio.
This commit is contained in:
committed by
Konstantin Pastbin
parent
92d7499012
commit
957afb1709
@@ -38,15 +38,17 @@ public class RoutingErrorDialogFragment extends BaseRoutingErrorDialogFragment
|
|||||||
ResultCodesHelper.getDialogTitleSubtitle(requireContext(), mResultCode, mMissingMaps.size());
|
ResultCodesHelper.getDialogTitleSubtitle(requireContext(), mResultCode, mMissingMaps.size());
|
||||||
Pair<String, String> titleMessage = resHolder.getTitleMessage();
|
Pair<String, String> titleMessage = resHolder.getTitleMessage();
|
||||||
|
|
||||||
TextView titleView = new TextView(requireContext());
|
if (!TextUtils.isEmpty(titleMessage.first))
|
||||||
titleView.setText(titleMessage.first);
|
{
|
||||||
titleView.setPadding(65, 32, 32, 16);
|
TextView titleView = new TextView(requireContext());
|
||||||
titleView.setTextSize(18);
|
titleView.setText(titleMessage.first);
|
||||||
titleView.setMaxLines(4);
|
titleView.setPadding(65, 32, 32, 16);
|
||||||
titleView.setEllipsize(TextUtils.TruncateAt.END);
|
titleView.setTextSize(18);
|
||||||
titleView.setTypeface(null, Typeface.BOLD);
|
titleView.setMaxLines(4);
|
||||||
builder.setCustomTitle(titleView);
|
titleView.setEllipsize(TextUtils.TruncateAt.END);
|
||||||
|
titleView.setTypeface(null, Typeface.BOLD);
|
||||||
|
builder.setCustomTitle(titleView);
|
||||||
|
}
|
||||||
mMessage = titleMessage.second;
|
mMessage = titleMessage.second;
|
||||||
builder.setNegativeButton(resHolder.getCancelBtnResId(), null);
|
builder.setNegativeButton(resHolder.getCancelBtnResId(), null);
|
||||||
if (ResultCodesHelper.isDownloadable(mResultCode, mMissingMaps.size()))
|
if (ResultCodesHelper.isDownloadable(mResultCode, mMissingMaps.size()))
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
android:paddingEnd="@dimen/margin_base_plus"
|
android:paddingEnd="@dimen/margin_base_plus"
|
||||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
|
tools:text="Select maps to download"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="visible"/>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
|||||||
Reference in New Issue
Block a user