Android - Add bottom navigation view dynamically
问题 I try to add a bottom navigation view dynamically. I know that I add a navigation view inside activity's xml file. <android.support.design.widget.BottomNavigationView android:id="@+id/navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="start" design:menu="@menu/items" /> I don't want to create a item xml file. I used below code to create navigation bar. bottomNavigationView = new BottomNavigationView(this); ViewGroup.LayoutParams params