Workaround long press bottom navigation view

This commit is contained in:
M66B 2021-05-30 07:44:06 +02:00
parent d4a9e8acb8
commit be84c22d18
1 changed files with 15 additions and 7 deletions

View File

@ -826,13 +826,13 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
} }
}); });
bottom_navigation.findViewById(R.id.action_delete).setOnLongClickListener(new View.OnLongClickListener() { //bottom_navigation.findViewById(R.id.action_delete).setOnLongClickListener(new View.OnLongClickListener() {
@Override // @Override
public boolean onLongClick(View v) { // public boolean onLongClick(View v) {
onActionDelete(); // onActionDelete();
return true; // return true;
} // }
}); //});
bottom_navigation.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { bottom_navigation.setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() {
@Override @Override
@ -5221,6 +5221,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
bottom_navigation.getMenu().findItem(R.id.action_snooze).setVisible(data.snoozable); bottom_navigation.getMenu().findItem(R.id.action_snooze).setVisible(data.snoozable);
bottom_navigation.getMenu().findItem(R.id.action_archive).setVisible(data.archivable); bottom_navigation.getMenu().findItem(R.id.action_archive).setVisible(data.archivable);
bottom_navigation.setVisibility(View.VISIBLE); bottom_navigation.setVisibility(View.VISIBLE);
bottom_navigation.findViewById(R.id.action_delete).setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
onActionDelete();
return true;
}
});
} }
@Override @Override