下面展示了如何在子fragment中获取父fragment的底部导航控件

BottomNavigationView bottomNavigationView = (BottomNavigationView) getParentFragment().getView().findViewById(R.id.bv);

主要需要强转为指定的控件

Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐