第一步
在Xml 中
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/button"
>
第二步
在java代码zhong
button = (BottomTabBar) findViewById(R.id.button);
button.init(getSupportFragmentManager())
.setImgSize(50, 50)//图片大小
.setFontSize(20)//字体大小
.setTabPadding(4, 6, 10)//内边距
.setChangeColor(Color.RED, Color.GREEN)//选中和未选中颜色
.addTabItem("第一项", null, AFragment.class)
.addTabItem("第二项", null, BFragment.class)
.setTabBarBackgroundColor(Color.WHITE)//背景色
.isShowDivider(false);//是否显示边框