compile 'com.squareup.okhttp3:okhttp:3.3.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.github.bumptech.glide:glide:3.8.0'
compile 'com.android.support:design:25.2.0'
//上拉加载下拉刷新框架
compile 'com.chanven.lib:cptr:1.1.0'
//轮播图Banner
compile 'com.youth.banner:banner:1.4.9'
需要导入的依赖导入Retrofit2.0以上包
compile 'com.squareup.retrofit2:retrofit:2.1.0'
该包对gson进行了一次封装使用起来更加方便
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//为了让PhotoView不用和模拟器,手机冲突
compile 'com.bm.photoview:library:1.4.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
Xml中
<com.bm.library.PhotoView
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerInside"
android:src="@mipmap/ic_launcher" />
OrmLite中添加的依赖
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.j256.ormlite:ormlite-core:4.48'
Rxjava1.0
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
Rxjava2.0
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
xrecyclerview(只有下拉刷新,没有上拉刷新)
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.github.bumptech.glide:glide:3.8.0'
compile 'com.android.support:design:25.2.0'
//上拉加载下拉刷新框架
compile 'com.chanven.lib:cptr:1.1.0'
//轮播图Banner
compile 'com.youth.banner:banner:1.4.9'
需要导入的依赖导入Retrofit2.0以上包
compile 'com.squareup.retrofit2:retrofit:2.1.0'
该包对gson进行了一次封装使用起来更加方便
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//为了让PhotoView不用和模拟器,手机冲突
compile 'com.bm.photoview:library:1.4.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
Xml中
<com.bm.library.PhotoView
android:id="@+id/img"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerInside"
android:src="@mipmap/ic_launcher" />
OrmLite中添加的依赖
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.j256.ormlite:ormlite-core:4.48'
Rxjava1.0
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
Rxjava2.0
compile 'io.reactivex.rxjava2:rxjava:2.0.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
xrecyclerview(只有下拉刷新,没有上拉刷新)
compile 'com.jcodecraeer:xrecyclerview:1.3.2'
xml:
<com.jcodecraeer.xrecyclerview.XRecyclerView
android:id="@+id/xr_test"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"></com.jcodecraeer.xrecyclerview.XRecyclerView>
Java:
xr_test.setLoadingListener(new XRecyclerView.LoadingListener() {
@Override
public void onRefresh() {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
refreshData();
//使刷新结束
xr_test.refreshComplete();
}
}, 2000);
}
@Override
public void onLoadMore() {
loadMoreData();
xr_test.loadMoreComplete();
}
});
picasso(同Gilde用法相同)compile 'com.squareup.picasso:picasso:2.3.2'