mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53: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());
|
||||
Pair<String, String> titleMessage = resHolder.getTitleMessage();
|
||||
|
||||
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);
|
||||
|
||||
if (!TextUtils.isEmpty(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()))
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
android:paddingEnd="@dimen/margin_base_plus"
|
||||
android:textAppearance="@style/MwmTextAppearance.Body2"
|
||||
android:visibility="gone"
|
||||
tools:text="Select maps to download"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<View
|
||||
|
||||
Reference in New Issue
Block a user