I am using the new android.support.design.widget.BottomNavigationView from the support library. How can I set the current selection from code? I realized, that
android.support.design.widget.BottomNavigationView
You can try the performClick method :
View view = bottomNavigationView.findViewById(R.id.YOUR_ACTION); view.performClick();
Edit
From API 25.3.0 it was introduced the method setSelectedItemId(int id) which lets you mark an item as selected as if it was tapped.
setSelectedItemId(int id)