/**禁止长按弹出toast**/ BottomNavigationMenuView menuView = (BottomNavigationMenuView) bottomNavigationView.getChildAt(0); for (int i = 0; i < menuView.getChildCount(); i++) { final View view = menuView.getChildAt(i); view.setOnLongClickListener(new View.OnLongClickListener() { @Override public boolean onLongClick(View v) { // 返回true表示消费了长按事件,不再执行默认的长按行为 return true; } }); }
09-24
5078
08-20
2780