buttomtabbar

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.example.hp.myxjd.activity.MainAppActivity">
    <com.hjm.bottomtabbar.BottomTabBar
        android:id="@+id/bottom_tab_bar"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:tab_unselected_color="#000000"
        android:layout_alignParentTop="true"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true" />

</LinearLayout>

package com.example.hp.myxjd.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.example.hp.myxjd.fragment.FindFragment;
import com.example.hp.myxjd.fragment.HomeFragment;
import com.example.hp.myxjd.fragment.MineFragment;
import com.example.hp.myxjd.R;
import com.example.hp.myxjd.fragment.ShopFragment;
import com.example.hp.myxjd.fragment.SortFragment;
import com.hjm.bottomtabbar.BottomTabBar;

public class MainAppActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_app);
        getSupportActionBar().hide();
        BottomTabBar mBottomTabBar = (BottomTabBar) findViewById(R.id.bottom_tab_bar);
        mBottomTabBar.init(getSupportFragmentManager())
                .addTabItem("首页", R.mipmap.shouye2, R.mipmap.shouye1, HomeFragment.class)
                .addTabItem("分类", R.mipmap.fenlei2, R.mipmap.fenlei1, SortFragment.class)
                .addTabItem("发现",R.mipmap.faxian2,R.mipmap.faxian1, FindFragment.class)
                .addTabItem("购物车", R.mipmap.gouwuche2, R.mipmap.gouwuche1, ShopFragment.class)
                .addTabItem("我的", R.mipmap.wode2, R.mipmap.wode1, MineFragment.class);
    }
}
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.facebook.fresco:fresco:1.5.0'
compile 'com.facebook.fresco:animated-gif:1.5.0'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.hjm:BottomTabBar:1.1.1'
compile 'com.squareup.okio:okio:1.5.0'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.xhb:xbanner:1.0.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.youth.banner:banner:1.4.9'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.github.bumptech.glide:glide:4.0.0'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.7'
compile 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
compile 'com.github.bumptech.glide:glide:4.0.0'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值