Added icons to error popup menu

pull/194/merge
M66B 3 years ago
parent 3511cb2b20
commit 966d3faa96

@ -4066,11 +4066,15 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, ibError);
int order = 0;
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_help, order++, R.string.title_setup_help);
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_help, order++, R.string.title_setup_help).
setIcon(R.drawable.twotone_text_snippet_24);
if (Helper.hasValidFingerprint(context) || BuildConfig.DEBUG)
popupMenu.getMenu().add(Menu.NONE, R.string.menu_faq, order++, R.string.menu_faq);
popupMenu.getMenu().add(Menu.NONE, R.string.menu_setup, order++, R.string.menu_setup);
popupMenu.getMenu().add(Menu.NONE, R.string.title_clipboard_copy, order++, R.string.title_clipboard_copy);
popupMenu.getMenu().add(Menu.NONE, R.string.menu_faq, order++, R.string.menu_faq)
.setIcon(R.drawable.twotone_question_answer_24);
popupMenu.getMenu().add(Menu.NONE, R.string.menu_setup, order++, R.string.menu_setup)
.setIcon(R.drawable.twotone_settings_24);
popupMenu.getMenu().add(Menu.NONE, R.string.title_clipboard_copy, order++, R.string.title_clipboard_copy)
.setIcon(R.drawable.twotone_file_copy_24);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
@ -4123,6 +4127,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
}
});
popupMenu.insertIcons(context);
popupMenu.show();
}

@ -0,0 +1,15 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M15,11V4H4v8.17l0.59,-0.58 0.58,-0.59H6z"
android:strokeAlpha="0.3"
android:fillAlpha="0.3"/>
<path
android:fillColor="@android:color/white"
android:pathData="M21,6h-2v9L6,15v2c0,0.55 0.45,1 1,1h11l4,4L22,7c0,-0.55 -0.45,-1 -1,-1zM16,13c0.55,0 1,-0.45 1,-1L17,3c0,-0.55 -0.45,-1 -1,-1L3,2c-0.55,0 -1,0.45 -1,1v14l4,-4h10zM4.59,11.59l-0.59,0.58L4,4h11v7L5.17,11l-0.58,0.59z"/>
</vector>
Loading…
Cancel
Save