Set selected item in Android BottomNavigationView

前端 未结 21 2393
谎友^
谎友^ 2020-11-27 14:16

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

21条回答
  •  误落风尘
    2020-11-27 15:08

    I made a bug to Google about the fact that there's no reliable way to select the page on a BottomNavigationView: https://code.google.com/p/android/issues/detail?id=233697

    NavigationView apparently had a similar issue, which they fixed by adding a new setCheckedItem() method.

提交回复
热议问题