Small improvements

pull/156/head
M66B 6 years ago
parent c65a771209
commit 6ffc622f19

@ -102,18 +102,18 @@ public class AdapterAnswer extends RecyclerView.Adapter<AdapterAnswer.ViewHolder
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, view);
if (composable)
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_compose);
popupMenu.getMenu().add(Menu.NONE, 2, 2, R.string.title_answer_hide)
popupMenu.getMenu().add(Menu.NONE, R.string.title_compose, 1, R.string.title_compose);
popupMenu.getMenu().add(Menu.NONE, R.string.title_answer_hide, 2, R.string.title_answer_hide)
.setCheckable(true).setChecked(answer.hide);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case 1:
case R.string.title_compose:
onActionCompose();
return true;
case 2:
case R.string.title_answer_hide:
onActionHide(!item.isChecked());
return true;
default:

@ -153,14 +153,14 @@ public class AdapterIdentity extends RecyclerView.Adapter<AdapterIdentity.ViewHo
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, view);
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_synchronize_enabled)
popupMenu.getMenu().add(Menu.NONE, R.string.title_synchronize_enabled, 1, R.string.title_synchronize_enabled)
.setCheckable(true).setChecked(identity.synchronize);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case 1:
case R.string.title_synchronize_enabled:
onActionSync(!item.isChecked());
return true;
default:

@ -157,14 +157,14 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
PopupMenuLifecycle popupMenu = new PopupMenuLifecycle(context, powner, view);
popupMenu.getMenu().add(Menu.NONE, 1, 1, R.string.title_rule_enabled)
popupMenu.getMenu().add(Menu.NONE, R.string.title_rule_enabled, 1, R.string.title_rule_enabled)
.setCheckable(true).setChecked(rule.enabled);
popupMenu.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case 1:
case R.string.title_rule_enabled:
onActionEnabled(!item.isChecked());
return true;
default:

Loading…
Cancel
Save