bottomnavigationview使用
时间: 2023-09-01 08:12:18 浏览: 117
Android BottomNavigationView 的使用
BottomNavigationView是安卓官方提供的底部导航栏控件,常常与fragment一起使用。要使用BottomNavigationView,首先需要导入相应的包,例如implementation 'com.google.android.material:material:1.0.0'。然后,在布局文件中添加BottomNavigationView的代码,设置其id、宽高、文本颜色、图标颜色和菜单等属性。具体的使用可以参考官方的设计规范 https://material.io/guidelines/components/bottom-navigation.html#,根据需要可以设置底部导航的标签数量在3到5之间时使用BottomNavigationView。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [BottomNavigationView--基本使用总结](https://blog.csdn.net/lwh156541064/article/details/104658144)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [BottomNavigationView的基本使用](https://blog.csdn.net/qq_32534441/article/details/105227916)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文