常用依赖

XRecyclerView

compile 'com.jcodecraeer:xrecyclerview:1.3.2'

BottomTabBar

compile 'com.hjm:BottomTabBar:1.1.1'

TabLayout

compile'com.android.support:design:26.0.0-alpha1'

TabLayout的布局

app:tabGravity="center"

   app:tabIndicatorColor="@color/colorAccent"

   app:tabMode="scrollable"

   app:tabSelectedTextColor="@color/colorPrimaryDark"

app:tabTextColor="@color/colorPrimary"

ImageLoader

compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'

Gson

compile'com.google.code.gson:gson:2.2.4'

OKhttp

compile'com.squareup.okhttp3:okhttp:3.6.0'

compile'com.squareup.okio:okio:1.11.0'

RecyclerView

compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'

Glide

compile'com.github.bumptech.glide:glide:3.7.0'

XBanner

compile'com.xhb:xbanner:1.0.0'

PullToRefresh

compile'com.github.userswlwork:pull-to-refresh:1.0.0'

pulltorefresh相关

   ptr:ptrDrawable="@drawable/default_ptr_flip":刷新时显示的图片

   ptr:ptrAnimationStyle="flip":刷新的图片以何种方式显示出来

   ptr:ptrHeaderBackground="#383838":刷新时头部的布局的背景色

ptr:ptrHeaderTextColor="#FFFFFF":刷新时头部字体的颜色

ptr:ptrDrawable="@drawable/default_ptr_flip"
ptr:ptrAnimationStyle="flip"
ptr:ptrHeaderBackground="#383838"
ptr:ptrHeaderTextColor="#FFFFFF"

还需要添加以下的命名空间

  xmlns:ptr="http://schemas.android.com/apk/res-auto"

//1.设置模式 

BOTH:支持上拉与下拉  PULL_FROM_START:支持下拉   PULL_FROM_END:支持上拉

plv.setMode(PullToRefreshBase.Mode.BOTH);

 

//2.设置头尾布局中的文本

   ILoadingLayoutheaderLayout = plv.getLoadingLayoutProxy(true, false);//第一个参数为true,代表设置头部布局中文本

       headerLayout.setPullLabel("下拉刷新...");

       headerLayout.setRefreshingLabel("正在刷新...");

       headerLayout.setReleaseLabel("松开刷新.....");

 

   ILoadingLayoutfooterLayout = plv.getLoadingLayoutProxy(false, true);//第一个参数为false,代表设置尾部布局中文本

       footerLayout.setPullLabel("加载更多...");

       footerLayout.setRefreshingLabel("正在加载...");

       footerLayout.setReleaseLabel("松开加载.....");


Fresco

// 在 API < 14 上的机器支持WebP 时,需要添加

  compile'com.facebook.fresco:animated-base-support:0.12.0'

 

  // 支持 GIF 动图,需要添加

  compile'com.facebook.fresco:animated-gif:0.12.0'

 

  // 支持 WebP (静态图+动图),需要添加

  compile'com.facebook.fresco:animated-webp:0.12.0'

  compile'com.facebook.fresco:webpsupport:0.12.0'

 

  // 仅支持 WebP 静态图,需要添加

  compile'com.facebook.fresco:webpsupport:0.12.0'

httpURLConnection

useLibrary 'org.apache.http.legacy'

banner的依赖

compile 'com.youth.banner:banner:1.4.10'

Banner的设置

myBanner.setImageLoader(new MyBannerLoader());//添加自定义的图片加载器

myBanner.setImages(urls);//设置图片资源

myBanner.start();//开始轮播

universal-image-loader的依赖

compile files('libs/universal-image-loader-1.9.3-with-sources.jar')

全部加载fragment

viewPager.setOffscreenPageLimit(tabs.size());



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值