How to select the first item in a navigation drawer and open a fragment on application start

前端 未结 8 603
鱼传尺愫
鱼传尺愫 2021-02-04 05:32

I have created MainActivity with NavigationView. When Activity is opened I want to automatically select the first item in the navigation d

8条回答
  •  轮回少年
    2021-02-04 06:18

    You could also use navigationView.setCheckedItem(R.id.default)(javadoc) after you setup your navigationview.

提交回复
热议问题