XRecyclerView
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
BottomTabBarcompile 'com.hjm:BottomTabBar:1.1.1'
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"
ImageLoadercompile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
Gsoncompile'com.google.code.gson:gson:2.2.4'
OKhttpcompile'com.squareup.okhttp3:okhttp:3.6.0'
compile'com.squareup.okio:okio:1.11.0'
RecyclerViewcompile '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());