Chip menu icons

pull/194/merge
M66B 3 years ago
parent fb514fd299
commit 0f476b4139

@ -275,11 +275,19 @@ public class EditTextMultiAutoComplete extends AppCompatMultiAutoCompleteTextVie
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); ss.setSpan(new RelativeSizeSpan(0.9f), 0, ss.length(), 0);
PopupMenu popupMenu = new PopupMenu(context, this); TwoStateOwner owner = new TwoStateOwner("Chip");
popupMenu.getMenu().add(Menu.NONE, 0, 1, ss).setEnabled(false); PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, owner, this);
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_contact, 2, R.string.title_edit_contact); popupMenu.getMenu().add(Menu.NONE, 0, 1, ss)
popupMenu.getMenu().add(Menu.NONE, R.string.title_clipboard_copy, 3, R.string.title_clipboard_copy); .setEnabled(false)
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, 4, R.string.title_delete); .setIcon(R.drawable.twotone_alternate_email_24);
popupMenu.getMenu().add(Menu.NONE, R.string.title_edit_contact, 2, R.string.title_edit_contact)
.setIcon(R.drawable.twotone_edit_24);
popupMenu.getMenu().add(Menu.NONE, R.string.title_clipboard_copy, 3, R.string.title_clipboard_copy)
.setIcon(R.drawable.twotone_file_copy_24);
popupMenu.getMenu().add(Menu.NONE, R.string.title_delete, 4, R.string.title_delete)
.setIcon(R.drawable.twotone_delete_24);
popupMenu.insertIcons(context);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() { popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override @Override

Loading…
Cancel
Save