Android(安卓)子fragment中获取父fragment中的控件
16lz
2021-01-24
下面展示了如何在子fragment中获取父fragment的底部导航控件
BottomNavigationView bottomNavigationView = (BottomNavigationView) getParentFragment().getView().findViewById(R.id.bv);
主要需要强转为指定的控件
更多相关文章
- Android-BaseAdapter-study
- Android实现ImageView图片双击放大及缩小
- 学习android的布局
- Android(安卓)内存泄漏 - 不要用static修饰控件
- Android常用控件-DatePicker以及对话框的两种使用方法
- 在Android线程中设置控件的值会报错
- Android(安卓)RecycerView 中根据图片大小自适应控件大小的实现
- Android(安卓)实现仿支付宝的密码均分输入框
- Android选择一段日期