Smaller popup menu titles

pull/172/head
M66B 5 years ago
parent a7e737ea50
commit bd0b12748c

@ -31,6 +31,7 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.provider.Settings; import android.provider.Settings;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -235,6 +236,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
SpannableString ss = new SpannableString(account.name); SpannableString ss = new SpannableString(account.name);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
popupMenu.getMenu().add(Menu.NONE, R.string.title_enabled, 1, R.string.title_enabled) popupMenu.getMenu().add(Menu.NONE, R.string.title_enabled, 1, R.string.title_enabled)

@ -24,6 +24,7 @@ import android.content.Intent;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -112,6 +113,7 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
SpannableString ss = new SpannableString(answer.name); SpannableString ss = new SpannableString(answer.name);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
if (composable) if (composable)

@ -23,6 +23,7 @@ import android.content.Context;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -86,6 +87,7 @@ public class AdapterCertificate extends RecyclerView.Adapter<AdapterCertificate.
SpannableString ss = new SpannableString(certificate.email); SpannableString ss = new SpannableString(certificate.email);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, 1, R.string.title_delete); popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, 1, R.string.title_delete);

@ -30,6 +30,7 @@ import android.os.ParcelFileDescriptor;
import android.provider.ContactsContract; import android.provider.ContactsContract;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -228,6 +229,7 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
SpannableString ss = new SpannableString(contact.email); SpannableString ss = new SpannableString(contact.email);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
if (contact.state != EntityContact.STATE_IGNORE) if (contact.state != EntityContact.STATE_IGNORE)

@ -32,6 +32,7 @@ import android.os.Bundle;
import android.provider.Settings; import android.provider.Settings;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
@ -411,6 +412,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
if (folder.selectable) { if (folder.selectable) {
SpannableString ss = new SpannableString(folder.getDisplayName(context)); SpannableString ss = new SpannableString(folder.getDisplayName(context));
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
popupMenu.getMenu().add(Menu.NONE, R.string.title_synchronize_now, 1, R.string.title_synchronize_now); popupMenu.getMenu().add(Menu.NONE, R.string.title_synchronize_now, 1, R.string.title_synchronize_now);

@ -25,6 +25,7 @@ import android.graphics.Color;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -181,6 +182,7 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
SpannableString ss = new SpannableString(identity.email); SpannableString ss = new SpannableString(identity.email);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
popupMenu.getMenu().add(Menu.NONE, R.string.title_enabled, 1, R.string.title_enabled) popupMenu.getMenu().add(Menu.NONE, R.string.title_enabled, 1, R.string.title_enabled)

@ -24,6 +24,7 @@ import android.content.Intent;
import android.graphics.Typeface; import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -194,6 +195,7 @@ public class AdapterOperation extends RecyclerView.Adapter<AdapterOperation.View
SpannableString ss = new SpannableString(operation.name + ":" + operation.id); SpannableString ss = new SpannableString(operation.name + ":" + operation.id);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss) popupMenu.getMenu().add(Menu.NONE, 0, 0, ss)
.setEnabled(false); .setEnabled(false);

@ -25,6 +25,7 @@ import android.graphics.Typeface;
import android.os.Bundle; import android.os.Bundle;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.Menu; import android.view.Menu;
@ -202,6 +203,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
SpannableString ss = new SpannableString(rule.name); SpannableString ss = new SpannableString(rule.name);
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false); popupMenu.getMenu().add(Menu.NONE, 0, 0, ss).setEnabled(false);
popupMenu.getMenu().add(Menu.NONE, R.string.title_rule_enabled, 1, R.string.title_rule_enabled) popupMenu.getMenu().add(Menu.NONE, R.string.title_rule_enabled, 1, R.string.title_rule_enabled)

@ -56,6 +56,7 @@ import android.security.KeyChain;
import android.text.SpannableString; import android.text.SpannableString;
import android.text.TextUtils; import android.text.TextUtils;
import android.text.format.DateUtils; import android.text.format.DateUtils;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan; import android.text.style.StyleSpan;
import android.util.Base64; import android.util.Base64;
import android.util.LongSparseArray; import android.util.LongSparseArray;
@ -990,6 +991,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
SpannableString ss = new SpannableString(getString(R.string.title_search_server)); SpannableString ss = new SpannableString(getString(R.string.title_search_server));
ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0); ss.setSpan(new StyleSpan(Typeface.ITALIC), 0, ss.length(), 0);
ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
popupMenu.getMenu().add(Menu.NONE, 0, 0, ss) popupMenu.getMenu().add(Menu.NONE, 0, 0, ss)
.setEnabled(false); .setEnabled(false);
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_search_text) popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_search_text)

Loading…
Cancel
Save