关于底部导航栏

BottomBar,简单可直接导入的底部导航栏。

食用方式

1.只需要到给出的github地址中拷贝BottomBar类到项目包下即可

2.xml中

<com.example.bottombar.BottomBar
    android:background="#FFFFFF"
    android:id="@+id/bottom_bar"
    android:layout_width="match_parent"
    android:layout_height="46dp"
    android:layout_gravity="bottom" />

3.java代码中

BottomBar bottomBar = findViewById(R.id.bottom_bar);
bottomBar.setContainer(R.id.fl_container)
        .setTitleBeforeAndAfterColor("#999999", "#ff5d5e")
        .addItem(Fragment1.class,
                "首页",
                R.drawable.item1_before,
                R.drawable.item1_after)
        .addItem(Fragment2.class,
                "订单",
                R.drawable.item2_before,
                R.drawable.item2_after)
        .addItem(Fragment3.class,
                "我的",
                R.drawable.item3_before,
                R.drawable.item3_after)
        .build();
转载自:https://github.com/xubinhong/BottomBar
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值