本篇是自己在学习
BottomNavigationView时整理的笔记。
效果图:

目录结构:

####https://github.com/Evan-zch/BottomNavigationViewDemo
正文
前面呈现的效果图是现在很多主流App都在使用底部导航栏模式,比如常用的微信、QQ这些基本的社交软件,其实要实现上面的效果也很简单。
1、布局文件
<android.support.design.widget.BottomNavigationView
android:id="@+id/bv_bottomNavigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/write"
app:itemIconTint="@drawable/bottom_navigation_item_selector"
app:itemTextColor="@drawable/bottom_navigation_item_s

这篇博客介绍了如何使用BottomNavigationView结合Fragment实现底部导航栏功能,包括在布局文件中添加库,自定义颜色和图标,创建Fragment切换效果,以及在Activity中初始化设置。特别提到,当底部导航栏项目超过三个时,可以通过反射处理来达到预期效果。

2987

被折叠的 条评论
为什么被折叠?



