mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Added menu divider in answer menu
This commit is contained in:
parent
e8a8be6542
commit
3704f10f55
1 changed files with 4 additions and 2 deletions
|
@ -2634,7 +2634,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
int order = 100;
|
int order = 100;
|
||||||
for (EntityAnswer answer : data.answers) {
|
for (EntityAnswer answer : data.answers) {
|
||||||
order++;
|
order++;
|
||||||
popupMenu.getMenu().add(1, order, order, answer.name)
|
popupMenu.getMenu().add(Menu.FIRST, order, order, answer.name)
|
||||||
.setIcon(R.drawable.twotone_star_24)
|
.setIcon(R.drawable.twotone_star_24)
|
||||||
.setIntent(new Intent().putExtra("id", answer.id));
|
.setIntent(new Intent().putExtra("id", answer.id));
|
||||||
}
|
}
|
||||||
|
@ -2642,10 +2642,12 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
||||||
|
|
||||||
popupMenu.insertIcons(context);
|
popupMenu.insertIcons(context);
|
||||||
|
|
||||||
|
MenuCompat.setGroupDividerEnabled(popupMenu.getMenu(), true);
|
||||||
|
|
||||||
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem target) {
|
public boolean onMenuItemClick(MenuItem target) {
|
||||||
if (target.getGroupId() == 1) {
|
if (target.getGroupId() == Menu.FIRST) {
|
||||||
startActivity(new Intent(context, ActivityCompose.class)
|
startActivity(new Intent(context, ActivityCompose.class)
|
||||||
.putExtra("action", "reply")
|
.putExtra("action", "reply")
|
||||||
.putExtra("reference", message.id)
|
.putExtra("reference", message.id)
|
||||||
|
|
Loading…
Reference in a new issue