Small layout improvement

This commit is contained in:
M66B 2021-06-30 08:37:35 +02:00
parent 4aee9c1cda
commit 74ed3ef426
1 changed files with 6 additions and 2 deletions

View File

@ -4526,8 +4526,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor); PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(getContext(), getViewLifecycleOwner(), vwAnchor);
SpannableStringBuilder all = new SpannableStringBuilder(getString(R.string.title_language_all)); SpannableStringBuilder all = new SpannableStringBuilder(getString(R.string.title_language_all));
if (current == null) if (current == null) {
all.setSpan(new StyleSpan(Typeface.BOLD), 0, all.length(), 0); all.setSpan(new StyleSpan(Typeface.BOLD), 0, all.length(), 0);
all.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_LARGE), 0, all.length(), 0);
}
popupMenu.getMenu().add(Menu.NONE, 0, 0, all); popupMenu.getMenu().add(Menu.NONE, 0, 0, all);
@ -4535,8 +4537,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
Locale locale = locales.get(i); Locale locale = locales.get(i);
String language = locale.getLanguage(); String language = locale.getLanguage();
SpannableStringBuilder title = new SpannableStringBuilder(locale.getDisplayLanguage()); SpannableStringBuilder title = new SpannableStringBuilder(locale.getDisplayLanguage());
if (language.equals(current)) if (language.equals(current)) {
title.setSpan(new StyleSpan(Typeface.BOLD), 0, title.length(), 0); title.setSpan(new StyleSpan(Typeface.BOLD), 0, title.length(), 0);
title.setSpan(new RelativeSizeSpan(HtmlHelper.FONT_LARGE), 0, title.length(), 0);
}
popupMenu.getMenu() popupMenu.getMenu()
.add(Menu.NONE, i + 1, i + 1, title) .add(Menu.NONE, i + 1, i + 1, title)
.setIntent(new Intent().putExtra("locale", locale)); .setIntent(new Intent().putExtra("locale", locale));