Advertisement

Android BottomTabBar的简单操作(类似于京东底部导航栏)

阅读量:

可视化表达的运用

这里写图片描述

bottomTabBar是由第三方提供的fragment结合radioButton与图片组件实现的
最关键的是能够在导航栏中添加图片元素
按照常规做法,首先需要引入相关依赖:

复制代码
    //bottomTabBar
    compile 'com.hjm:BottomTabBar:1.1.1'
    
      
      
    

接下来是布局:

复制代码
    <com.hjm.bottomtabbar.BottomTabBar
        android:id="@+id/bottomTabBar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"></com.hjm.bottomtabbar.BottomTabBar>
    
      
      
      
      
    

随后需在MainActivity中完成相应的代码实现:

复制代码

全部评论 (0)

还没有任何评论哟~