├── .idea
├── .name
├── copyright
│ └── profiles_settings.xml
├── encodings.xml
├── vcs.xml
├── runConfigurations.xml
├── compiler.xml
├── modules.xml
├── gradle.xml
└── misc.xml
├── app
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ ├── values
│ │ │ ├── strings.xml
│ │ │ ├── colors.xml
│ │ │ ├── dimens.xml
│ │ │ └── styles.xml
│ │ ├── drawable
│ │ │ ├── empty_view.png
│ │ │ └── error_view.png
│ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ ├── values-w820dp
│ │ │ └── dimens.xml
│ │ └── layout
│ │ │ ├── item_header.xml
│ │ │ ├── item_image.xml
│ │ │ ├── activity_list_view.xml
│ │ │ ├── item_footer.xml
│ │ │ ├── activity_recycler_view.xml
│ │ │ ├── item_controler.xml
│ │ │ ├── empty_view.xml
│ │ │ ├── activity_main.xml
│ │ │ ├── item_user.xml
│ │ │ ├── error_view.xml
│ │ │ └── footer_load_more.xml
│ │ ├── java
│ │ └── com
│ │ │ └── tellh
│ │ │ └── nolistadaptersample
│ │ │ ├── bean
│ │ │ ├── ImageItem.java
│ │ │ ├── User.java
│ │ │ └── Response.java
│ │ │ ├── MainActivity.java
│ │ │ ├── rv
│ │ │ ├── HeaderBinder.java
│ │ │ ├── ImageItemRecyclerViewBinder.java
│ │ │ ├── UserRecyclerViewBinder.java
│ │ │ ├── FooterBinder.java
│ │ │ ├── ErrorBinder.java
│ │ │ ├── ControlerRecyclerViewBinder.java
│ │ │ └── LoadMoreFooterBinderRecycler.java
│ │ │ ├── lv
│ │ │ ├── ImageItemListViewBinder.java
│ │ │ └── UserListViewBinder.java
│ │ │ ├── ListViewActivity.java
│ │ │ └── RecyclerViewActivity.java
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── nolistadapter-lv
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── java
│ │ └── com
│ │ │ └── tellh
│ │ │ └── nolistadapter
│ │ │ ├── IListAdapter_LV.java
│ │ │ ├── EasyListViewBinder.java
│ │ │ ├── ListViewBinder.java
│ │ │ ├── EasyListViewHolder.java
│ │ │ └── ListViewAdapter.java
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── nolistadapter-rv
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── tellh
│ │ └── nolistadapter
│ │ ├── adapter
│ │ ├── IListAdapter_RV.java
│ │ ├── FooterLoadMoreAdapterWrapper.java
│ │ ├── HeaderAndFooterAdapterWrapper.java
│ │ └── RecyclerViewAdapter.java
│ │ └── viewbinder
│ │ ├── utils
│ │ ├── EasyRecyclerViewBinder.java
│ │ ├── EasyEmptyRecyclerViewBinder.java
│ │ ├── EasyErrorRecyclerViewBinder.java
│ │ └── EasyRecyclerViewHolder.java
│ │ ├── sub
│ │ ├── EmptyRecyclerViewBinder.java
│ │ ├── FooterRecyclerViewBinder.java
│ │ ├── HeaderRecyclerViewBinder.java
│ │ └── ErrorRecyclerViewBinder.java
│ │ └── base
│ │ └── RecyclerViewBinder.java
├── proguard-rules.pro
└── build.gradle
├── nolistadapter-common
├── .gitignore
├── src
│ └── main
│ │ ├── res
│ │ └── values
│ │ │ └── strings.xml
│ │ ├── java
│ │ └── com
│ │ │ └── tellh
│ │ │ └── nolistadapter
│ │ │ ├── LayoutItemType.java
│ │ │ ├── IViewBinder.java
│ │ │ ├── IViewBinderProvider.java
│ │ │ ├── IListAdapter.java
│ │ │ └── DataBean.java
│ │ └── AndroidManifest.xml
├── proguard-rules.pro
└── build.gradle
├── raw
├── databean.png
├── empty_view.gif
├── error_view.gif
├── load_more.gif
└── principle.png
├── settings.gradle
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── .gitignore
├── gradle.properties
├── gradlew.bat
├── gradlew
├── README.md
└── LICENSE
/.idea/.name:
--------------------------------------------------------------------------------
1 | NoListAdapter
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/nolistadapter-lv/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/nolistadapter-rv/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/nolistadapter-common/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/raw/databean.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/raw/databean.png
--------------------------------------------------------------------------------
/raw/empty_view.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/raw/empty_view.gif
--------------------------------------------------------------------------------
/raw/error_view.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/raw/error_view.gif
--------------------------------------------------------------------------------
/raw/load_more.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/raw/load_more.gif
--------------------------------------------------------------------------------
/raw/principle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/raw/principle.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':nolistadapter-rv', ':nolistadapter-common', ':nolistadapter-lv'
2 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | NoListAdapter
3 |
4 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/res/drawable/empty_view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/drawable/empty_view.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/error_view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/drawable/error_view.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | nolistadapter-lv
3 |
4 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | nolistadapter-rv
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | nolistadapter-common
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TellH/NoListAdapter/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/java/com/tellh/nolistadapter/IListAdapter_LV.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | /**
4 | * Created by tlh on 2016/9/14 :)
5 | */
6 | public interface IListAdapter_LV extends IListAdapter {
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/java/com/tellh/nolistadapter/LayoutItemType.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | /**
4 | * Created by tlh on 2016/9/12 :)
5 | */
6 | public interface LayoutItemType {
7 | int getItemLayoutId(IListAdapter adapter);
8 | }
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Oct 04 11:08:40 GMT+08:00 2016
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
7 |
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 64dp
6 |
7 |
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/java/com/tellh/nolistadapter/IViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by tlh on 2016/9/14 :)
7 | */
8 | public interface IViewBinder extends LayoutItemType {
9 | VH provideViewHolder(View itemView);
10 |
11 | void bindView(IListAdapter adapter, VH holder, int position, T entity);
12 | }
13 |
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/java/com/tellh/nolistadapter/IViewBinderProvider.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import android.support.v4.util.SparseArrayCompat;
4 |
5 | /**
6 | * Created by tlh on 2016/9/12 :)
7 | */
8 | public interface IViewBinderProvider {
9 | IViewBinder provideViewBinder(IListAdapter adapter, SparseArrayCompat extends IViewBinder> viewBinderPool, int position);
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/java/com/tellh/nolistadapter/EasyListViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import android.view.View;
4 |
5 | /**
6 | * Created by tlh on 2016/9/14 :)
7 | */
8 | public abstract class EasyListViewBinder extends ListViewBinder {
9 | @Override
10 | public EasyListViewHolder provideViewHolder(View itemView) {
11 | return new EasyListViewHolder(itemView);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/adapter/IListAdapter_RV.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.adapter;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 |
5 | import com.tellh.nolistadapter.IListAdapter;
6 |
7 | /**
8 | * Created by tlh on 2016/9/14 :)
9 | */
10 | public interface IListAdapter_RV extends IListAdapter {
11 | void clear(RecyclerView recyclerView);
12 |
13 | void showErrorView(RecyclerView recyclerView);
14 |
15 | void hideErrorView(RecyclerView recyclerView);
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/bean/ImageItem.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.bean;
2 |
3 | import tellh.com.nolistadapter.R;
4 | import com.tellh.nolistadapter.DataBean;
5 | import com.tellh.nolistadapter.IListAdapter;
6 |
7 | public class ImageItem extends DataBean {
8 | public String url;
9 |
10 | public ImageItem(String url) {
11 | this.url = url;
12 | }
13 |
14 | @Override
15 | public int getItemLayoutId(IListAdapter adapter) {
16 | return R.layout.item_image;
17 | }
18 | }
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/java/com/tellh/nolistadapter/IListAdapter.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by tlh on 2016/9/13 :)
7 | */
8 | public interface IListAdapter {
9 | List getDisplayList();
10 |
11 | void addAll(List extends DataBean> list);
12 |
13 | void refresh(List extends DataBean> list);
14 |
15 | void add(int pos, DataBean item);
16 |
17 | void delete(int pos);
18 |
19 | void swap(int fromPosition, int toPosition);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_header.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
13 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_image.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
14 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
11 |
12 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/utils/EasyRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.utils;
2 |
3 | import android.view.View;
4 |
5 | import com.tellh.nolistadapter.IViewBinderProvider;
6 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
7 |
8 | /**
9 | * Created by tlh on 2016/9/12 :)
10 | */
11 | public abstract class EasyRecyclerViewBinder extends RecyclerViewBinder {
12 | @Override
13 | final public EasyRecyclerViewHolder provideViewHolder(View itemView) {
14 | return new EasyRecyclerViewHolder(itemView);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/nolistadapter-common/src/main/java/com/tellh/nolistadapter/DataBean.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 |
4 | import android.support.v4.util.SparseArrayCompat;
5 |
6 | /**
7 | * Created by tlh on 2016/9/12 :)
8 | */
9 | public abstract class DataBean implements IViewBinderProvider, LayoutItemType {
10 | private IViewBinder viewBinder;
11 |
12 | @Override
13 | public final IViewBinder provideViewBinder(IListAdapter adapter, SparseArrayCompat extends IViewBinder> viewBinderPool, int position) {
14 | if (viewBinder == null) {
15 | viewBinder = viewBinderPool.get(getItemLayoutId(adapter));
16 | }
17 | return viewBinder;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_list_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
14 |
15 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_footer.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
11 |
17 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\AndroidSDK\AndroidStudio/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_recycler_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/java/com/tellh/nolistadapter/ListViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import android.support.annotation.IdRes;
4 | import android.view.View;
5 |
6 | /**
7 | * Created by tlh on 2016/9/14 :)
8 | */
9 | public abstract class ListViewBinder
10 | implements LayoutItemType, IViewBinder {
11 | public static class ViewHolder {
12 | public View itemView;
13 | public ViewHolder(View rootView) {
14 | this.itemView = rootView;
15 | }
16 | protected T findViewById(@IdRes int id) {
17 | return (T) itemView.findViewById(id);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/nolistadapter-common/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\AndroidSDK\AndroidStudio/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/nolistadapter-lv/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\AndroidSDK\AndroidStudio/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/nolistadapter-rv/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in D:\AndroidSDK\AndroidStudio/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample;
2 |
3 | import android.content.Intent;
4 | import android.support.v7.app.AppCompatActivity;
5 | import android.os.Bundle;
6 | import android.view.View;
7 |
8 | import tellh.com.nolistadapter.R;
9 |
10 | public class MainActivity extends AppCompatActivity {
11 |
12 | @Override
13 | protected void onCreate(Bundle savedInstanceState) {
14 | super.onCreate(savedInstanceState);
15 | setContentView(R.layout.activity_main);
16 | }
17 |
18 | public void onClickRV(View view) {
19 | startActivity(new Intent(this, RecyclerViewActivity.class));
20 | }
21 |
22 | public void onClickLV(View view) {
23 | startActivity(new Intent(this, ListViewActivity.class));
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/sub/EmptyRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.sub;
2 |
3 | import com.tellh.nolistadapter.IListAdapter;
4 | import com.tellh.nolistadapter.IViewBinderProvider;
5 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
6 |
7 | /**
8 | * Created by tlh on 2016/9/13 :)
9 | */
10 | public abstract class EmptyRecyclerViewBinder extends RecyclerViewBinder {
11 | @Override
12 | final public void bindView(IListAdapter adapter, VH holder, int position, IViewBinderProvider entity) {
13 | bindEmptyView(adapter, holder, position);
14 | }
15 |
16 | protected abstract void bindEmptyView(IListAdapter adapter, VH holder, int position);
17 | }
18 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/sub/FooterRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.sub;
2 |
3 | import com.tellh.nolistadapter.IListAdapter;
4 | import com.tellh.nolistadapter.IViewBinderProvider;
5 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
6 |
7 | /**
8 | * Created by tlh on 2016/9/13 :)
9 | */
10 | public abstract class FooterRecyclerViewBinder extends RecyclerViewBinder {
11 | @Override
12 | final public void bindView(IListAdapter adapter, VH holder, int position, IViewBinderProvider entity) {
13 | bindFooter(adapter, holder, position);
14 | }
15 |
16 | protected abstract void bindFooter(IListAdapter adapter, VH holder, int position);
17 | }
18 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/sub/HeaderRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.sub;
2 |
3 | import com.tellh.nolistadapter.IListAdapter;
4 | import com.tellh.nolistadapter.IViewBinderProvider;
5 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
6 |
7 | /**
8 | * Created by tlh on 2016/9/13 :)
9 | */
10 | public abstract class HeaderRecyclerViewBinder extends RecyclerViewBinder {
11 | @Override
12 | final public void bindView(IListAdapter adapter, VH holder, int position, IViewBinderProvider entity) {
13 | bindHeader(adapter, holder, position);
14 | }
15 |
16 | protected abstract void bindHeader(IListAdapter adapter, VH holder, int position);
17 | }
18 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/sub/ErrorRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.sub;
2 |
3 | import com.tellh.nolistadapter.IListAdapter;
4 | import com.tellh.nolistadapter.IViewBinderProvider;
5 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
6 |
7 | /**
8 | * Created by tlh on 2016/9/13 :)
9 | */
10 | public abstract class ErrorRecyclerViewBinder extends RecyclerViewBinder {
11 | public boolean showNow;
12 |
13 | @Override
14 | final public void bindView(IListAdapter adapter, VH holder, int position, IViewBinderProvider entity) {
15 | bindErrorView(adapter, holder, position);
16 | }
17 |
18 | protected abstract void bindErrorView(IListAdapter adapter, VH holder, int position);
19 | }
20 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_controler.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
11 |
12 |
18 |
19 |
25 |
26 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m
13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
14 |
15 | # When configured, Gradle will run in incubating parallel mode.
16 | # This option should only be used with decoupled projects. More details, visit
17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
18 | # org.gradle.parallel=true
--------------------------------------------------------------------------------
/app/src/main/res/layout/empty_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/base/RecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.base;
2 |
3 | import android.support.annotation.IdRes;
4 | import android.support.v7.widget.RecyclerView;
5 | import android.view.View;
6 |
7 | import com.tellh.nolistadapter.IListAdapter;
8 | import com.tellh.nolistadapter.IViewBinder;
9 | import com.tellh.nolistadapter.IViewBinderProvider;
10 |
11 | /**
12 | * Created by tlh on 2016/9/12 :)
13 | */
14 | public abstract class RecyclerViewBinder implements IViewBinder {
15 | public abstract VH provideViewHolder(View itemView);
16 |
17 | public abstract void bindView(IListAdapter adapter, VH holder, int position, T entity);
18 |
19 | public static class ViewHolder extends RecyclerView.ViewHolder {
20 | public ViewHolder(View rootView) {
21 | super(rootView);
22 | }
23 |
24 | protected T findViewById(@IdRes int id) {
25 | return (T) itemView.findViewById(id);
26 | }
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/utils/EasyEmptyRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.utils;
2 |
3 | import android.support.annotation.LayoutRes;
4 | import android.view.View;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
8 | import com.tellh.nolistadapter.viewbinder.sub.EmptyRecyclerViewBinder;
9 |
10 | /**
11 | * Created by tlh on 2016/9/13 :)
12 | */
13 | public class EasyEmptyRecyclerViewBinder extends EmptyRecyclerViewBinder {
14 | @LayoutRes
15 | int layoutId;
16 |
17 | public EasyEmptyRecyclerViewBinder(@LayoutRes int layoutId) {
18 | this.layoutId = layoutId;
19 | }
20 |
21 | @Override
22 | protected void bindEmptyView(IListAdapter adapter, ViewHolder holder, int position) {
23 | }
24 |
25 | @Override
26 | public ViewHolder provideViewHolder(View itemView) {
27 | return new ViewHolder(itemView);
28 | }
29 |
30 | @Override
31 | public int getItemLayoutId(IListAdapter adapter) {
32 | return layoutId;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/utils/EasyErrorRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.utils;
2 |
3 | import android.support.annotation.LayoutRes;
4 | import android.view.View;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
8 | import com.tellh.nolistadapter.viewbinder.sub.ErrorRecyclerViewBinder;
9 |
10 | /**
11 | * Created by tlh on 2016/9/13 :)
12 | */
13 | public class EasyErrorRecyclerViewBinder extends ErrorRecyclerViewBinder {
14 | @LayoutRes
15 | int layoutId;
16 |
17 | public EasyErrorRecyclerViewBinder(@LayoutRes int layoutId) {
18 | this.layoutId = layoutId;
19 | }
20 |
21 | @Override
22 | protected void bindErrorView(IListAdapter adapter, ViewHolder holder, int position) {
23 | }
24 |
25 | @Override
26 | public ViewHolder provideViewHolder(View itemView) {
27 | return new ViewHolder(itemView);
28 | }
29 |
30 | @Override
31 | public int getItemLayoutId(IListAdapter adapter) {
32 | return layoutId;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
20 |
21 |
28 |
29 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/item_user.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
11 |
12 |
18 |
19 |
25 |
26 |
27 |
35 |
36 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 24
5 | buildToolsVersion "24.0.1"
6 |
7 | defaultConfig {
8 | applicationId "tellh.com.nolistadapter"
9 | minSdkVersion 14
10 | targetSdkVersion 24
11 | versionCode 1
12 | versionName "1.0"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | }
21 |
22 | dependencies {
23 | compile fileTree(dir: 'libs', include: ['*.jar'])
24 | testCompile 'junit:junit:4.12'
25 | compile 'com.android.support:appcompat-v7:24.2.1'
26 | compile "com.android.support:design:24.2.1"
27 | compile "com.android.support:recyclerview-v7:24.2.1"
28 | compile "com.android.support:cardview-v7:24.2.1"
29 | compile 'com.google.code.gson:gson:2.7'
30 | compile 'com.squareup.picasso:picasso:2.5.2'
31 |
32 | // compile 'com.github.TellH.NoListAdapter:nolistadapter-lv:1.0.2'
33 | // compile 'com.github.TellH.NoListAdapter:nolistadapter-rv:1.0.2'
34 | // compile 'com.tellh:nolistadapter-rv:1.0.2'
35 | compile project(':nolistadapter-rv')
36 | compile project(':nolistadapter-lv')
37 | }
38 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/bean/User.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.bean;
2 |
3 | import tellh.com.nolistadapter.R;
4 | import com.tellh.nolistadapter.IListAdapter;
5 | import com.tellh.nolistadapter.DataBean;
6 |
7 | /**
8 | * Created by tlh on 2016/9/12 :)
9 | */
10 | public class User extends DataBean {
11 | private String login;
12 | private int id;
13 | private String html_url;
14 | private String avatar_url;
15 |
16 | public String getAvatar_url() {
17 | return avatar_url;
18 | }
19 |
20 | public void setAvatar_url(String avatar_url) {
21 | this.avatar_url = avatar_url;
22 | }
23 |
24 | public String getLogin() {
25 | return login;
26 | }
27 |
28 | public void setLogin(String login) {
29 | this.login = login;
30 | }
31 |
32 | public int getId() {
33 | return id;
34 | }
35 |
36 | public void setId(int id) {
37 | this.id = id;
38 | }
39 |
40 | public String getHtml_url() {
41 | return html_url;
42 | }
43 |
44 | public void setHtml_url(String html_url) {
45 | this.html_url = html_url;
46 | }
47 |
48 | @Override
49 | public int getItemLayoutId(IListAdapter adapter) {
50 | return R.layout.item_user;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/error_view.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
12 |
13 |
17 |
18 |
24 |
25 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/footer_load_more.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
25 |
26 |
33 |
--------------------------------------------------------------------------------
/nolistadapter-lv/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.github.dcendents.android-maven'
3 | group='com.github.tellh'
4 | apply plugin: 'com.novoda.bintray-release'
5 | android {
6 | compileSdkVersion 24
7 | buildToolsVersion "24.0.1"
8 |
9 | defaultConfig {
10 | minSdkVersion 14
11 | targetSdkVersion 24
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | compile fileTree(dir: 'libs', include: ['*.jar'])
25 | testCompile 'junit:junit:4.12'
26 | compile project(':nolistadapter-common')
27 | }
28 | publish {
29 | artifactId = 'nolistadapter-lv'
30 | userOrg = rootProject.userOrg
31 | groupId = rootProject.groupId
32 | uploadName = rootProject.uploadName
33 | publishVersion = rootProject.publishVersion
34 | desc = rootProject.description
35 | website = rootProject.website
36 | licences = rootProject.licences
37 | }
38 | tasks.withType(JavaCompile) {
39 | options.encoding = "UTF-8"
40 | }
41 |
42 | task sourcesJar(type: Jar) {
43 | from android.sourceSets.main.java.srcDirs
44 | classifier = 'sources'
45 | }
--------------------------------------------------------------------------------
/nolistadapter-common/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.github.dcendents.android-maven'
3 | group='com.github.tellh'
4 | apply plugin: 'com.novoda.bintray-release'
5 | android {
6 | compileSdkVersion 24
7 | buildToolsVersion "24.0.1"
8 |
9 | defaultConfig {
10 | minSdkVersion 14
11 | targetSdkVersion 24
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | compile fileTree(include: ['*.jar'], dir: 'libs')
25 | testCompile 'junit:junit:4.12'
26 | compile 'com.android.support:support-v4:24.2.0'
27 | }
28 | publish {
29 | artifactId = 'nolistadapter-common'
30 | userOrg = rootProject.userOrg
31 | groupId = rootProject.groupId
32 | uploadName = rootProject.uploadName
33 | publishVersion = rootProject.publishVersion
34 | desc = rootProject.description
35 | website = rootProject.website
36 | licences = rootProject.licences
37 | }
38 | tasks.withType(JavaCompile) {
39 | options.encoding = "UTF-8"
40 | }
41 |
42 | task sourcesJar(type: Jar) {
43 | from android.sourceSets.main.java.srcDirs
44 | classifier = 'sources'
45 | }
--------------------------------------------------------------------------------
/nolistadapter-rv/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'com.github.dcendents.android-maven'
3 | group='com.github.tellh'
4 | apply plugin: 'com.novoda.bintray-release'
5 | android {
6 | compileSdkVersion 24
7 | buildToolsVersion "24.0.1"
8 |
9 | defaultConfig {
10 | minSdkVersion 14
11 | targetSdkVersion 24
12 | versionCode 1
13 | versionName "1.0"
14 | }
15 | buildTypes {
16 | release {
17 | minifyEnabled false
18 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
19 | }
20 | }
21 | }
22 |
23 | dependencies {
24 | compile fileTree(dir: 'libs', include: ['*.jar'])
25 | testCompile 'junit:junit:4.12'
26 | compile "com.android.support:recyclerview-v7:24.2.0"
27 | compile project(':nolistadapter-common')
28 | }
29 | publish {
30 | artifactId = 'nolistadapter-rv'
31 | userOrg = rootProject.userOrg
32 | groupId = rootProject.groupId
33 | uploadName = rootProject.uploadName
34 | publishVersion = rootProject.publishVersion
35 | desc = rootProject.description
36 | website = rootProject.website
37 | licences = rootProject.licences
38 | }
39 |
40 | tasks.withType(JavaCompile) {
41 | options.encoding = "UTF-8"
42 | }
43 |
44 | task sourcesJar(type: Jar) {
45 | from android.sourceSets.main.java.srcDirs
46 | classifier = 'sources'
47 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/HeaderBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.view.View;
4 | import android.widget.TextView;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
8 | import com.tellh.nolistadapter.viewbinder.sub.HeaderRecyclerViewBinder;
9 |
10 | import tellh.com.nolistadapter.R;
11 |
12 | /**
13 | * Created by tlh on 2016/9/12 :)
14 | */
15 | public class HeaderBinder extends HeaderRecyclerViewBinder {
16 | private String hint;
17 |
18 | public HeaderBinder(String hint) {
19 | this.hint = hint;
20 | }
21 |
22 | @Override
23 | public ViewHolder provideViewHolder(View itemView) {
24 | return new ViewHolder(itemView);
25 | }
26 |
27 | @Override
28 | protected void bindHeader(IListAdapter adapter, ViewHolder holder, int position) {
29 | holder.tvHeader.setText(hint);
30 | }
31 |
32 | @Override
33 | public int getItemLayoutId(IListAdapter adapter) {
34 | return R.layout.item_header;
35 | }
36 |
37 | public static class ViewHolder extends RecyclerViewBinder.ViewHolder {
38 | public TextView tvHeader;
39 |
40 | public ViewHolder(View rootView) {
41 | super(rootView);
42 | this.tvHeader = findViewById(R.id.tv_header);
43 | }
44 |
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/ImageItemRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.widget.ImageView;
4 |
5 | import com.squareup.picasso.Picasso;
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.utils.EasyRecyclerViewBinder;
8 | import com.tellh.nolistadapter.viewbinder.utils.EasyRecyclerViewHolder;
9 | import com.tellh.nolistadaptersample.bean.ImageItem;
10 |
11 | import tellh.com.nolistadapter.R;
12 |
13 | /**
14 | * Created by tlh on 2016/9/12 :)
15 | */
16 | public class ImageItemRecyclerViewBinder extends EasyRecyclerViewBinder {
17 |
18 | @Override
19 | public void bindView(IListAdapter adapter, EasyRecyclerViewHolder holder, int position, ImageItem entity) {
20 | ImageView imageView = holder.getImageView(R.id.image);
21 | Picasso.with(imageView.getContext())
22 | .load(entity.url)
23 | .placeholder(R.mipmap.ic_launcher)
24 | .into(imageView);
25 | }
26 |
27 | @Override
28 | public int getItemLayoutId(IListAdapter adapter) {
29 | return R.layout.item_image;
30 | }
31 |
32 | // protected class ViewHolder extends RecyclerViewBinder.ViewHolder {
33 | // ImageView imageView;
34 | //
35 | // public ViewHolder(View rootView) {
36 | // super(rootView);
37 | // imageView = findViewById(R.id.image);
38 | // }
39 | // }
40 | }
41 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/lv/ImageItemListViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.lv;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 |
6 | import com.squareup.picasso.Picasso;
7 | import com.tellh.nolistadapter.IListAdapter;
8 | import com.tellh.nolistadapter.ListViewBinder;
9 | import com.tellh.nolistadaptersample.bean.ImageItem;
10 |
11 | import tellh.com.nolistadapter.R;
12 |
13 | /**
14 | * Created by tlh on 2016/9/14 :)
15 | */
16 | public class ImageItemListViewBinder extends ListViewBinder {
17 | @Override
18 | public ViewHolder provideViewHolder(View itemView) {
19 | return new ViewHolder(itemView);
20 | }
21 |
22 | @Override
23 | public void bindView(IListAdapter adapter, ViewHolder holder, int position, ImageItem entity) {
24 | Picasso.with(holder.image.getContext())
25 | .load(entity.url)
26 | .placeholder(R.mipmap.ic_launcher)
27 | .into(holder.image);
28 | }
29 |
30 | @Override
31 | public int getItemLayoutId(IListAdapter adapter) {
32 | return R.layout.item_image;
33 | }
34 |
35 | public static class ViewHolder extends ListViewBinder.ViewHolder {
36 | public ImageView image;
37 |
38 | public ViewHolder(View rootView) {
39 | super(rootView);
40 | this.image = (ImageView) rootView.findViewById(R.id.image);
41 | }
42 |
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/lv/UserListViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.lv;
2 |
3 | import android.view.View;
4 | import android.widget.TextView;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.ListViewBinder;
8 | import com.tellh.nolistadaptersample.bean.User;
9 |
10 | import tellh.com.nolistadapter.R;
11 |
12 | /**
13 | * Created by tlh on 2016/9/14 :)
14 | */
15 | public class UserListViewBinder extends ListViewBinder {
16 | @Override
17 | public ViewHolder provideViewHolder(View itemView) {
18 | return new ViewHolder(itemView);
19 | }
20 |
21 | @Override
22 | public void bindView(IListAdapter adapter, ViewHolder holder, int position, User entity) {
23 | holder.tvId.setText(String.valueOf(entity.getId()));
24 | holder.tvName.setText(entity.getLogin());
25 | holder.tvUrl.setText(entity.getHtml_url());
26 | }
27 |
28 | @Override
29 | public int getItemLayoutId(IListAdapter adapter) {
30 | return R.layout.item_user;
31 | }
32 |
33 | public static class ViewHolder extends ListViewBinder.ViewHolder {
34 | public TextView tvId;
35 | public TextView tvName;
36 | public TextView tvUrl;
37 |
38 | public ViewHolder(View rootView) {
39 | super(rootView);
40 | this.tvId = (TextView) rootView.findViewById(R.id.tv_id);
41 | this.tvName = (TextView) rootView.findViewById(R.id.tv_name);
42 | this.tvUrl = (TextView) rootView.findViewById(R.id.tv_url);
43 | }
44 |
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/UserRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.view.View;
4 | import android.widget.TextView;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
8 | import com.tellh.nolistadaptersample.bean.User;
9 |
10 | import tellh.com.nolistadapter.R;
11 |
12 | /**
13 | * Created by tlh on 2016/9/12 :)
14 | */
15 | public class UserRecyclerViewBinder extends RecyclerViewBinder {
16 | @Override
17 | public ViewHolder provideViewHolder(View itemView) {
18 | return new UserRecyclerViewBinder.ViewHolder(itemView);
19 | }
20 |
21 | @Override
22 | public void bindView(IListAdapter adapter, UserRecyclerViewBinder.ViewHolder holder, int position, User entity) {
23 | holder.tvId.setText(String.valueOf(entity.getId()));
24 | holder.tvName.setText(entity.getLogin());
25 | holder.tvUrl.setText(entity.getHtml_url());
26 | }
27 |
28 | @Override
29 | public int getItemLayoutId(IListAdapter adapter) {
30 | return R.layout.item_user;
31 | }
32 |
33 | protected class ViewHolder extends RecyclerViewBinder.ViewHolder {
34 | public TextView tvId;
35 | public TextView tvName;
36 | public TextView tvUrl;
37 |
38 | public ViewHolder(View rootView) {
39 | super(rootView);
40 | this.tvId = findViewById(R.id.tv_id);
41 | this.tvName = findViewById(R.id.tv_name);
42 | this.tvUrl = findViewById(R.id.tv_url);
43 | }
44 |
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/FooterBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 | import android.widget.TextView;
6 |
7 | import com.tellh.nolistadapter.IListAdapter;
8 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
9 | import com.tellh.nolistadapter.viewbinder.sub.FooterRecyclerViewBinder;
10 |
11 | import tellh.com.nolistadapter.R;
12 |
13 | /**
14 | * Created by tlh on 2016/9/12 :)
15 | */
16 | public class FooterBinder extends FooterRecyclerViewBinder {
17 | private String txtFooter;
18 |
19 | public FooterBinder(String txtFooter) {
20 | this.txtFooter = txtFooter;
21 | }
22 |
23 | @Override
24 | public ViewHolder provideViewHolder(View itemView) {
25 | return new ViewHolder(itemView);
26 | }
27 |
28 | @Override
29 | protected void bindFooter(IListAdapter adapter, ViewHolder holder, int position) {
30 | holder.ivFooter.setImageResource(R.mipmap.ic_launcher);
31 | holder.tvFooter.setText(txtFooter);
32 | }
33 |
34 | @Override
35 | public int getItemLayoutId(IListAdapter adapter) {
36 | return R.layout.item_footer;
37 | }
38 |
39 | public static class ViewHolder extends RecyclerViewBinder.ViewHolder {
40 | public ImageView ivFooter;
41 | public TextView tvFooter;
42 |
43 | public ViewHolder(View rootView) {
44 | super(rootView);
45 | this.ivFooter = (ImageView) rootView.findViewById(R.id.iv_footer);
46 | this.tvFooter = (TextView) rootView.findViewById(R.id.tv_footer);
47 | }
48 |
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/ErrorBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.view.View;
4 | import android.widget.Button;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
8 | import com.tellh.nolistadapter.viewbinder.sub.ErrorRecyclerViewBinder;
9 |
10 | import tellh.com.nolistadapter.R;
11 |
12 | /**
13 | * Created by tlh on 2016/9/14 :)
14 | */
15 | public class ErrorBinder extends ErrorRecyclerViewBinder {
16 | OnReLoadCallback callback;
17 |
18 | public ErrorBinder(OnReLoadCallback callback) {
19 | this.callback = callback;
20 | }
21 |
22 | @Override
23 | protected void bindErrorView(IListAdapter adapter, ViewHolder holder, int position) {
24 | holder.btn_refresh.setOnClickListener(new View.OnClickListener() {
25 | @Override
26 | public void onClick(View view) {
27 | if (callback != null)
28 | callback.reload();
29 | }
30 | });
31 | }
32 |
33 | @Override
34 | public ViewHolder provideViewHolder(View itemView) {
35 | return new ViewHolder(itemView);
36 | }
37 |
38 | @Override
39 | public int getItemLayoutId(IListAdapter adapter) {
40 | return R.layout.error_view;
41 | }
42 |
43 | public static class ViewHolder extends RecyclerViewBinder.ViewHolder {
44 | Button btn_refresh;
45 |
46 | public ViewHolder(View rootView) {
47 | super(rootView);
48 | btn_refresh = findViewById(R.id.btn_refresh);
49 | }
50 | }
51 |
52 | public interface OnReLoadCallback {
53 | void reload();
54 | }
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/ControlerRecyclerViewBinder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.view.View;
4 | import android.widget.Button;
5 |
6 | import com.tellh.nolistadapter.IListAdapter;
7 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
8 | import com.tellh.nolistadapter.viewbinder.sub.HeaderRecyclerViewBinder;
9 | import com.tellh.nolistadaptersample.RecyclerViewActivity;
10 |
11 | import tellh.com.nolistadapter.R;
12 |
13 | /**
14 | * Created by tlh on 2016/9/12 :)
15 | */
16 | public class ControlerRecyclerViewBinder extends HeaderRecyclerViewBinder {
17 |
18 | private RecyclerViewActivity activity;
19 |
20 | public ControlerRecyclerViewBinder(RecyclerViewActivity activity) {
21 | this.activity = activity;
22 | }
23 |
24 | @Override
25 | public int getItemLayoutId(IListAdapter adapter) {
26 | return R.layout.item_controler;
27 | }
28 |
29 | @Override
30 | public ViewHolder provideViewHolder(View itemView) {
31 | return new ControlerRecyclerViewBinder.ViewHolder(itemView);
32 | }
33 |
34 | @Override
35 | protected void bindHeader(final IListAdapter adapter, ViewHolder holder, int position) {
36 | holder.btnRefresh.setOnClickListener(new View.OnClickListener() {
37 | @Override
38 | public void onClick(View view) {
39 | activity.refresh();
40 | }
41 | });
42 | holder.btnClear.setOnClickListener(new View.OnClickListener() {
43 | @Override
44 | public void onClick(View view) {
45 | activity.clear();
46 | }
47 | });
48 | holder.btnError.setOnClickListener(new View.OnClickListener() {
49 | @Override
50 | public void onClick(View view) {
51 | activity.showError();
52 | }
53 | });
54 | }
55 |
56 | public static class ViewHolder extends RecyclerViewBinder.ViewHolder {
57 | public Button btnRefresh;
58 | public Button btnClear;
59 | public Button btnError;
60 |
61 | public ViewHolder(View rootView) {
62 | super(rootView);
63 | this.btnRefresh = (Button) rootView.findViewById(R.id.btn_refresh);
64 | this.btnClear = (Button) rootView.findViewById(R.id.btn_clear);
65 | this.btnError = (Button) rootView.findViewById(R.id.btn_error);
66 | }
67 |
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/java/com/tellh/nolistadapter/EasyListViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import android.text.method.LinkMovementMethod;
4 | import android.util.SparseArray;
5 | import android.view.View;
6 | import android.widget.Button;
7 | import android.widget.EditText;
8 | import android.widget.ImageButton;
9 | import android.widget.ImageView;
10 | import android.widget.TextView;
11 |
12 | public class EasyListViewHolder extends ListViewBinder.ViewHolder {
13 | private SparseArray mViews;
14 |
15 | public EasyListViewHolder(View itemView) {
16 | super(itemView);
17 | mViews = new SparseArray<>();
18 | }
19 |
20 | @Override
21 | protected T findViewById(int viewId) {
22 | View view = mViews.get(viewId);
23 | if (view == null) {
24 | view = itemView.findViewById(viewId);
25 | mViews.put(viewId, view);
26 | }
27 | return (T) view;
28 | }
29 |
30 | public View getView(int viewId) {
31 | return findViewById(viewId);
32 | }
33 |
34 | public TextView getTextView(int viewId) {
35 | return (TextView) getView(viewId);
36 | }
37 |
38 | public Button getButton(int viewId) {
39 | return (Button) getView(viewId);
40 | }
41 |
42 | public ImageView getImageView(int viewId) {
43 | return (ImageView) getView(viewId);
44 | }
45 |
46 | public ImageButton getImageButton(int viewId) {
47 | return (ImageButton) getView(viewId);
48 | }
49 |
50 | public EditText getEditText(int viewId) {
51 | return (EditText) getView(viewId);
52 | }
53 |
54 | public EasyListViewHolder setText(int viewId, String value) {
55 | TextView view = findViewById(viewId);
56 | view.setText(value);
57 | return this;
58 | }
59 |
60 | public EasyListViewHolder setText(int viewId, CharSequence value) {
61 | TextView view = findViewById(viewId);
62 | view.setMovementMethod(LinkMovementMethod.getInstance());
63 | view.setText(value);
64 | return this;
65 | }
66 |
67 | public EasyListViewHolder setBackground(int viewId, int resId) {
68 | View view = findViewById(viewId);
69 | view.setBackgroundResource(resId);
70 | return this;
71 | }
72 |
73 | public EasyListViewHolder setClickListener(int viewId, View.OnClickListener listener) {
74 | View view = findViewById(viewId);
75 | view.setOnClickListener(listener);
76 | return this;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/viewbinder/utils/EasyRecyclerViewHolder.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.viewbinder.utils;
2 |
3 | import android.support.v7.widget.RecyclerView;
4 | import android.text.method.LinkMovementMethod;
5 | import android.util.SparseArray;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.EditText;
9 | import android.widget.ImageButton;
10 | import android.widget.ImageView;
11 | import android.widget.TextView;
12 |
13 | public class EasyRecyclerViewHolder extends RecyclerView.ViewHolder {
14 | private SparseArray mViews;
15 |
16 | public EasyRecyclerViewHolder(View itemView) {
17 | super(itemView);
18 | mViews = new SparseArray<>();
19 | }
20 |
21 | public View getItemView() {
22 | return itemView;
23 | }
24 |
25 | private T findViewById(int viewId) {
26 | View view = mViews.get(viewId);
27 | if (view == null) {
28 | view = itemView.findViewById(viewId);
29 | mViews.put(viewId, view);
30 | }
31 | return (T) view;
32 | }
33 |
34 | public View getView(int viewId) {
35 | return findViewById(viewId);
36 | }
37 |
38 | public TextView getTextView(int viewId) {
39 | return (TextView) getView(viewId);
40 | }
41 |
42 | public Button getButton(int viewId) {
43 | return (Button) getView(viewId);
44 | }
45 |
46 | public ImageView getImageView(int viewId) {
47 | return (ImageView) getView(viewId);
48 | }
49 |
50 | public ImageButton getImageButton(int viewId) {
51 | return (ImageButton) getView(viewId);
52 | }
53 |
54 | public EditText getEditText(int viewId) {
55 | return (EditText) getView(viewId);
56 | }
57 |
58 | public EasyRecyclerViewHolder setText(int viewId, String value) {
59 | TextView view = findViewById(viewId);
60 | view.setText(value);
61 | return this;
62 | }
63 |
64 | public EasyRecyclerViewHolder setText(int viewId, CharSequence value) {
65 | TextView view = findViewById(viewId);
66 | view.setMovementMethod(LinkMovementMethod.getInstance());
67 | view.setText(value);
68 | return this;
69 | }
70 |
71 | public EasyRecyclerViewHolder setBackground(int viewId, int resId) {
72 | View view = findViewById(viewId);
73 | view.setBackgroundResource(resId);
74 | return this;
75 | }
76 |
77 | public EasyRecyclerViewHolder setClickListener(int viewId, View.OnClickListener listener) {
78 | View view = findViewById(viewId);
79 | view.setOnClickListener(listener);
80 | return this;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | 1.8
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/ListViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample;
2 |
3 | import android.os.Bundle;
4 | import android.os.Handler;
5 | import android.support.v4.widget.SwipeRefreshLayout;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.view.LayoutInflater;
8 | import android.widget.ListView;
9 |
10 | import com.google.gson.Gson;
11 | import com.tellh.nolistadapter.DataBean;
12 | import com.tellh.nolistadapter.ListViewAdapter;
13 | import com.tellh.nolistadaptersample.bean.ImageItem;
14 | import com.tellh.nolistadaptersample.bean.Response;
15 | import com.tellh.nolistadaptersample.bean.User;
16 | import com.tellh.nolistadaptersample.lv.ImageItemListViewBinder;
17 | import com.tellh.nolistadaptersample.lv.UserListViewBinder;
18 |
19 | import java.util.ArrayList;
20 | import java.util.List;
21 |
22 | import tellh.com.nolistadapter.R;
23 |
24 | public class ListViewActivity extends AppCompatActivity {
25 |
26 | private ListView list;
27 | private SwipeRefreshLayout refreshLayout;
28 | private ListViewAdapter adapter;
29 |
30 | @Override
31 | protected void onCreate(Bundle savedInstanceState) {
32 | super.onCreate(savedInstanceState);
33 | setContentView(R.layout.activity_list_view);
34 | initView();
35 | initData();
36 | }
37 |
38 | private void initData() {
39 | Gson gson = new Gson();
40 | Response response = gson.fromJson(Response.responseJsonPage1, Response.class);
41 | List userList = response.getItems();
42 | List displayList = new ArrayList<>();
43 | for (int i = 0; i < userList.size(); i++) {
44 | displayList.add(new ImageItem(userList.get(i).getAvatar_url()));
45 | displayList.add(userList.get(i));
46 | }
47 | adapter = ListViewAdapter.builder()
48 | .displayList(displayList)
49 | .addItemType(new UserListViewBinder())
50 | .addItemType(new ImageItemListViewBinder())
51 | .build();
52 | list.setAdapter(adapter);
53 | list.addHeaderView(LayoutInflater.from(this).inflate(R.layout.item_header, null));
54 | }
55 |
56 | private void initView() {
57 | list = (ListView) findViewById(R.id.list);
58 | refreshLayout = (SwipeRefreshLayout) findViewById(R.id.refreshLayout);
59 | refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
60 | @Override
61 | public void onRefresh() {
62 | new Handler().postDelayed(new Runnable() {
63 | @Override
64 | public void run() {
65 | refresh();
66 | }
67 | }, 1000);
68 | }
69 | });
70 | }
71 |
72 | private void refresh() {
73 | refreshLayout.setRefreshing(true);
74 | Gson gson = new Gson();
75 | Response response = gson.fromJson(Response.responseJsonPage1, Response.class);
76 | List userList = response.getItems();
77 | List displayList = new ArrayList<>();
78 | for (int i = 0; i < userList.size(); i++) {
79 | displayList.add(new ImageItem(userList.get(i).getAvatar_url()));
80 | displayList.add(userList.get(i));
81 | }
82 | refreshLayout.setRefreshing(false);
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/rv/LoadMoreFooterBinderRecycler.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.rv;
2 |
3 | import android.view.View;
4 | import android.widget.ImageView;
5 | import android.widget.ProgressBar;
6 | import android.widget.TextView;
7 |
8 | import com.tellh.nolistadapter.IListAdapter;
9 | import com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper;
10 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
11 | import com.tellh.nolistadapter.viewbinder.sub.FooterRecyclerViewBinder;
12 |
13 | import tellh.com.nolistadapter.R;
14 |
15 | import static com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper.LOADING;
16 | import static com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper.NO_MORE;
17 | import static com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper.PULL_TO_LOAD_MORE;
18 |
19 | /**
20 | * Created by tlh on 2016/9/13 :)
21 | */
22 | public class LoadMoreFooterBinderRecycler extends FooterRecyclerViewBinder {
23 | private String toLoadText = "Pull to load more";
24 | private String noMoreText = "no more data";
25 | private String loadingText = "Loading…";
26 |
27 | @Override
28 | protected void bindFooter(IListAdapter adapter, ViewHolder holder, int position) {
29 | FooterLoadMoreAdapterWrapper adapterWrapper = (FooterLoadMoreAdapterWrapper) adapter;
30 | int size = adapter.getDisplayList().size();
31 | if (size == 0) {
32 | holder.progressBar.setVisibility(View.INVISIBLE);
33 | holder.tvFooter.setText("No Data");
34 | return;
35 | }
36 | if (size < 10) {
37 | holder.tvFooter.setText(noMoreText);
38 | holder.progressBar.setVisibility(View.INVISIBLE);
39 | return;
40 | }
41 | switch (adapterWrapper.getFooterStatus()) {
42 | case PULL_TO_LOAD_MORE:
43 | holder.progressBar.setVisibility(View.VISIBLE);
44 | holder.tvFooter.setText(toLoadText);
45 | break;
46 | case LOADING:
47 | holder.progressBar.setVisibility(View.VISIBLE);
48 | holder.tvFooter.setText(loadingText);
49 | break;
50 | case NO_MORE:
51 | holder.tvFooter.setText(noMoreText);
52 | holder.progressBar.setVisibility(View.INVISIBLE);
53 | break;
54 | }
55 | holder.ivFooter.setImageResource(R.mipmap.ic_launcher);
56 | }
57 |
58 | @Override
59 | public ViewHolder provideViewHolder(View itemView) {
60 | return new LoadMoreFooterBinderRecycler.ViewHolder(itemView);
61 | }
62 |
63 | @Override
64 | public int getItemLayoutId(IListAdapter adapter) {
65 | return R.layout.footer_load_more;
66 | }
67 |
68 | public static class ViewHolder extends RecyclerViewBinder.ViewHolder {
69 | public TextView tvFooter;
70 | public ProgressBar progressBar;
71 | public ImageView ivFooter;
72 |
73 | public ViewHolder(View rootView) {
74 | super(rootView);
75 | this.tvFooter = (TextView) rootView.findViewById(R.id.tv_footer);
76 | this.progressBar = (ProgressBar) rootView.findViewById(R.id.progressBar);
77 | this.ivFooter = (ImageView) rootView.findViewById(R.id.iv_footer);
78 | }
79 |
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/adapter/FooterLoadMoreAdapterWrapper.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.adapter;
2 |
3 | import android.support.annotation.IntDef;
4 | import android.support.v7.widget.LinearLayoutManager;
5 | import android.support.v7.widget.RecyclerView;
6 |
7 | import java.lang.annotation.Retention;
8 | import java.lang.annotation.RetentionPolicy;
9 | import java.util.List;
10 |
11 | /**
12 | * Created by tlh on 2016/2/18.
13 | *
14 | */
15 | public class FooterLoadMoreAdapterWrapper extends HeaderAndFooterAdapterWrapper {
16 | private int curPage;
17 | //UpdateType
18 | public static final int REFRESH = 401;
19 | public static final int LOAD_MORE = 140;
20 |
21 | public static final int PULL_TO_LOAD_MORE = 501;
22 | public static final int LOADING = 323;
23 | public static final int NO_MORE = 313;
24 |
25 | @IntDef({REFRESH, LOAD_MORE})
26 | @Retention(RetentionPolicy.SOURCE)
27 | public @interface UpdateType {
28 | }
29 |
30 | @IntDef({PULL_TO_LOAD_MORE, LOADING, NO_MORE})
31 | @Retention(RetentionPolicy.SOURCE)
32 | @interface FooterState {
33 | }
34 |
35 | @FooterState
36 | private int mFooterStatus = PULL_TO_LOAD_MORE;
37 |
38 | @FooterState
39 | public int getFooterStatus() {
40 | return mFooterStatus;
41 | }
42 |
43 | public FooterLoadMoreAdapterWrapper(RecyclerViewAdapter adapter, RecyclerView recyclerView, final OnReachFooterListener listener) {
44 | super(adapter);
45 | setOnReachFooterListener(recyclerView, listener);
46 | }
47 |
48 | public void setOnReachFooterListener(RecyclerView recyclerView, final OnReachFooterListener listener) {
49 | if (recyclerView == null || listener == null)
50 | return;
51 | recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
52 | @Override
53 | public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
54 | super.onScrollStateChanged(recyclerView, newState);
55 | if (!isReachBottom(recyclerView, newState) || getDisplayList().size() == 0 || (errorViewBinder != null && errorViewBinder.showNow))
56 | return;
57 | if (mFooterStatus != LOADING
58 | && mFooterStatus != NO_MORE) {
59 | setFooterStatus(LOADING);
60 | listener.onToLoadMore(curPage);
61 | }
62 | }
63 | });
64 | }
65 |
66 |
67 | public void setFooterStatus(@FooterState int status) {
68 | mFooterStatus = status;
69 | notifyDataSetChanged();
70 | }
71 |
72 | public boolean isReachBottom(RecyclerView recyclerView, int newState) {
73 | return recyclerView != null && newState == RecyclerView.SCROLL_STATE_IDLE
74 | && ((LinearLayoutManager) recyclerView.getLayoutManager()).findLastCompletelyVisibleItemPosition() == recyclerView.getAdapter().getItemCount() - 1;
75 | }
76 |
77 | public interface OnReachFooterListener {
78 | void onToLoadMore(int curPage);
79 | }
80 |
81 | public void OnGetData(List data, @UpdateType int updateType) {
82 | if (updateType == REFRESH) {
83 | refresh(data);
84 | curPage = 1;
85 | setFooterStatus(PULL_TO_LOAD_MORE);
86 | } else {
87 | if (data.isEmpty()) {
88 | setFooterStatus(NO_MORE);
89 | return;
90 | }
91 | addAll(data);
92 | curPage++;
93 | setFooterStatus(PULL_TO_LOAD_MORE);
94 | }
95 | }
96 |
97 | public int getCurPage() {
98 | return curPage;
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/nolistadapter-lv/src/main/java/com/tellh/nolistadapter/ListViewAdapter.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter;
2 |
3 | import android.support.v4.util.SparseArrayCompat;
4 | import android.view.LayoutInflater;
5 | import android.view.View;
6 | import android.view.ViewGroup;
7 | import android.widget.BaseAdapter;
8 |
9 | import java.util.ArrayList;
10 | import java.util.Collections;
11 | import java.util.List;
12 |
13 | public class ListViewAdapter extends BaseAdapter implements IListAdapter_LV {
14 | private static int SIZE_VIEW_BINDER_POOL = 10;
15 |
16 | private List displayList;
17 | private SparseArrayCompat viewBinderPool;
18 |
19 | public ListViewAdapter(List displayList) {
20 | viewBinderPool = new SparseArrayCompat<>(SIZE_VIEW_BINDER_POOL);
21 | if (displayList == null)
22 | displayList = new ArrayList<>();
23 | this.displayList = displayList;
24 | }
25 |
26 | @Override
27 | public List getDisplayList() {
28 | return displayList;
29 | }
30 |
31 | @Override
32 | public void addAll(List extends DataBean> list) {
33 | if (list == null)
34 | return;
35 | displayList.addAll(list);
36 | notifyDataSetChanged();
37 | }
38 |
39 | @Override
40 | public void refresh(List extends DataBean> list) {
41 | if (list == null)
42 | return;
43 | displayList.clear();
44 | displayList.addAll(list);
45 | notifyDataSetChanged();
46 | }
47 |
48 | @Override
49 | public void add(int pos, DataBean item) {
50 | displayList.add(pos, item);
51 | notifyDataSetChanged();
52 | }
53 |
54 | @Override
55 | public void delete(int pos) {
56 | displayList.remove(pos);
57 | notifyDataSetChanged();
58 | }
59 |
60 | @Override
61 | public void swap(int fromPosition, int toPosition) {
62 | Collections.swap(displayList, fromPosition, toPosition);
63 | notifyDataSetChanged();
64 | }
65 |
66 | @Override
67 | public int getCount() {
68 | return displayList == null ? 0 : displayList.size();
69 | }
70 |
71 | @Override
72 | public int getItemViewType(int position) {
73 | //getItemViewType() should <= getViewTypeCount().
74 | return viewBinderPool.indexOfKey(displayList.get(position).getItemLayoutId(this));
75 | }
76 |
77 | @Override
78 | public int getViewTypeCount() {
79 | return viewBinderPool.size();
80 | }
81 |
82 | @Override
83 | public Object getItem(int position) {
84 | return displayList.get(position);
85 | }
86 |
87 | @Override
88 | public long getItemId(int position) {
89 | return position;
90 | }
91 |
92 | @Override
93 | public View getView(int position, View convertView, ViewGroup parent) {
94 | DataBean entity = displayList.get(position);
95 | ListViewBinder viewBinder = (ListViewBinder) entity.provideViewBinder(this, viewBinderPool, position);
96 | final ListViewBinder.ViewHolder holder;
97 | View itemView;
98 | if (convertView == null) {
99 | itemView = LayoutInflater.from(parent.getContext())
100 | .inflate(viewBinder.getItemLayoutId(this), parent, false);
101 | holder = (ListViewBinder.ViewHolder) viewBinder.provideViewHolder(itemView);
102 | itemView.setTag(holder);
103 | } else {
104 | itemView = convertView;
105 | holder = (ListViewBinder.ViewHolder) itemView.getTag();
106 | }
107 | viewBinder.bindView(this, holder, position, entity);
108 | return itemView;
109 | }
110 |
111 | public static void setViewBinderPoolInitSize(int size) {
112 | SIZE_VIEW_BINDER_POOL = size;
113 | }
114 |
115 | public static Builder builder() {
116 | return new Builder();
117 | }
118 |
119 | public static class Builder {
120 | private ListViewAdapter adapter;
121 |
122 | public Builder() {
123 | adapter = new ListViewAdapter(null);
124 | }
125 |
126 | public Builder displayList(List extends DataBean> displayList) {
127 | List adapterList = adapter.getDisplayList();
128 | for (DataBean dataBean : displayList) {
129 | adapterList.add(dataBean);
130 | }
131 | return this;
132 | }
133 |
134 | public Builder addItemType(ListViewBinder viewBinder) {
135 | adapter.viewBinderPool.put(viewBinder.getItemLayoutId(adapter), viewBinder);
136 | return this;
137 | }
138 |
139 | public ListViewAdapter build() {
140 | return adapter;
141 | }
142 | }
143 | }
144 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/RecyclerViewActivity.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample;
2 |
3 | import android.os.Bundle;
4 | import android.os.Handler;
5 | import android.support.v4.widget.SwipeRefreshLayout;
6 | import android.support.v7.app.AppCompatActivity;
7 | import android.support.v7.widget.LinearLayoutManager;
8 | import android.support.v7.widget.RecyclerView;
9 | import android.widget.Toast;
10 |
11 | import com.google.gson.Gson;
12 | import com.tellh.nolistadapter.DataBean;
13 | import com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper;
14 | import com.tellh.nolistadapter.adapter.RecyclerViewAdapter;
15 | import com.tellh.nolistadapter.viewbinder.utils.EasyEmptyRecyclerViewBinder;
16 | import com.tellh.nolistadaptersample.bean.ImageItem;
17 | import com.tellh.nolistadaptersample.bean.Response;
18 | import com.tellh.nolistadaptersample.bean.User;
19 | import com.tellh.nolistadaptersample.rv.ControlerRecyclerViewBinder;
20 | import com.tellh.nolistadaptersample.rv.ErrorBinder;
21 | import com.tellh.nolistadaptersample.rv.FooterBinder;
22 | import com.tellh.nolistadaptersample.rv.HeaderBinder;
23 | import com.tellh.nolistadaptersample.rv.ImageItemRecyclerViewBinder;
24 | import com.tellh.nolistadaptersample.rv.LoadMoreFooterBinderRecycler;
25 | import com.tellh.nolistadaptersample.rv.UserRecyclerViewBinder;
26 |
27 | import java.util.ArrayList;
28 | import java.util.List;
29 |
30 | import tellh.com.nolistadapter.R;
31 |
32 | import static com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper.LOAD_MORE;
33 | import static com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper.REFRESH;
34 |
35 | public class RecyclerViewActivity extends AppCompatActivity implements FooterLoadMoreAdapterWrapper.OnReachFooterListener, ErrorBinder.OnReLoadCallback {
36 |
37 | private RecyclerView list;
38 | private RecyclerViewAdapter adapter;
39 | private SwipeRefreshLayout refreshLayout;
40 |
41 | @Override
42 | protected void onCreate(Bundle savedInstanceState) {
43 | super.onCreate(savedInstanceState);
44 | setContentView(R.layout.activity_recycler_view);
45 | initView();
46 | initData();
47 | }
48 |
49 | private void initData() {
50 | Gson gson = new Gson();
51 | Response response = gson.fromJson(Response.responseJsonPage1, Response.class);
52 | List userList = response.getItems();
53 | List displayList = new ArrayList<>();
54 | for (int i = 0; i < userList.size(); i++) {
55 | displayList.add(new ImageItem(userList.get(i).getAvatar_url()));
56 | displayList.add(userList.get(i));
57 | }
58 | adapter = RecyclerViewAdapter.builder()
59 | .displayList(displayList)
60 | .addItemType(new UserRecyclerViewBinder()) //different item type have different ways to bind data to ViewHolder.
61 | .addItemType(new ImageItemRecyclerViewBinder())
62 | .addHeader(new ControlerRecyclerViewBinder(this))
63 | .addHeader(new HeaderBinder("I am the first header! 我是沙发"))
64 | .addHeader(new HeaderBinder("I am the second header! 我是板凳"))
65 | .addFooter(new FooterBinder("------I am the footer!------"))
66 | .addFooter(new FooterBinder("------我是有底线的!-------"))
67 | .setLoadMoreFooter(new LoadMoreFooterBinderRecycler(), list, this)
68 | .setEmptyView(new EasyEmptyRecyclerViewBinder(R.layout.empty_view))
69 | // .setErrorView(new EasyErrorRecyclerViewBinder(R.layout.error_view))
70 | .setErrorView(new ErrorBinder(this))
71 | .build();
72 | list.setAdapter(adapter);
73 | }
74 |
75 | private void initView() {
76 | list = (RecyclerView) findViewById(R.id.list);
77 | refreshLayout = (SwipeRefreshLayout) findViewById(R.id.refreshLayout);
78 | list.setLayoutManager(new LinearLayoutManager(this));
79 | refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
80 | @Override
81 | public void onRefresh() {
82 | new Handler().postDelayed(new Runnable() {
83 | @Override
84 | public void run() {
85 | refresh();
86 | }
87 | }, 1000);
88 | }
89 | });
90 | }
91 |
92 | @Override
93 | protected void onDestroy() {
94 | adapter.clearViewBinderCache();
95 | super.onDestroy();
96 | }
97 |
98 | public void refresh() {
99 | refreshLayout.setRefreshing(true);
100 | Gson gson = new Gson();
101 | Response response = gson.fromJson(Response.responseJsonPage1, Response.class);
102 | List userList = response.getItems();
103 | List displayList = new ArrayList<>();
104 | for (int i = 0; i < userList.size(); i++) {
105 | displayList.add(new ImageItem(userList.get(i).getAvatar_url()));
106 | displayList.add(userList.get(i));
107 | }
108 | FooterLoadMoreAdapterWrapper footerLoadMoreAdapterWrapper = (FooterLoadMoreAdapterWrapper) adapter;
109 | footerLoadMoreAdapterWrapper.OnGetData(displayList, REFRESH);
110 | footerLoadMoreAdapterWrapper.hideErrorView(list);
111 | refreshLayout.setRefreshing(false);
112 | }
113 |
114 | public void loadMore() {
115 | FooterLoadMoreAdapterWrapper footerLoadMoreAdapterWrapper = (FooterLoadMoreAdapterWrapper) adapter;
116 | Gson gson = new Gson();
117 | Response response = gson.fromJson(Response.responseJsonPage2, Response.class);
118 | List userList = response.getItems();
119 | List displayList = new ArrayList<>();
120 | if (footerLoadMoreAdapterWrapper.getCurPage() != 3) {
121 | for (int i = 0; i < userList.size(); i++) {
122 | displayList.add(new ImageItem(userList.get(i).getAvatar_url()));
123 | displayList.add(userList.get(i));
124 | }
125 | }
126 | footerLoadMoreAdapterWrapper.OnGetData(displayList, LOAD_MORE);
127 | }
128 |
129 | @Override
130 | public void onToLoadMore(int curPage) {
131 | Toast.makeText(RecyclerViewActivity.this, "on to load more!", Toast.LENGTH_SHORT).show();
132 | new Handler().postDelayed(new Runnable() {
133 | @Override
134 | public void run() {
135 | loadMore();
136 | }
137 | }, 800);
138 | }
139 |
140 | public void clear() {
141 | adapter.clear(list);
142 | }
143 |
144 | public void showError() {
145 | adapter.showErrorView(list);
146 | }
147 |
148 | @Override
149 | public void reload() {
150 | refresh();
151 | }
152 | }
153 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/adapter/HeaderAndFooterAdapterWrapper.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.adapter;
2 |
3 | import android.content.Context;
4 | import android.support.v4.util.SparseArrayCompat;
5 | import android.support.v7.widget.GridLayoutManager;
6 | import android.support.v7.widget.RecyclerView;
7 | import android.support.v7.widget.StaggeredGridLayoutManager;
8 | import android.view.LayoutInflater;
9 | import android.view.ViewGroup;
10 |
11 | import com.tellh.nolistadapter.DataBean;
12 | import com.tellh.nolistadapter.IListAdapter;
13 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
14 | import com.tellh.nolistadapter.viewbinder.sub.ErrorRecyclerViewBinder;
15 |
16 | import java.util.ArrayList;
17 | import java.util.List;
18 |
19 |
20 | /**
21 | * Created by tlh on 2016/8/4.
22 | *
23 | */
24 | public class HeaderAndFooterAdapterWrapper extends RecyclerViewAdapter implements IListAdapter {
25 |
26 | private final RecyclerViewAdapter mAdapter;
27 | private SparseArrayCompat headerBinderPool;
28 | private SparseArrayCompat footerBinderPool;
29 | private List headerBinderList;
30 | private List footerBinderList;
31 |
32 | public HeaderAndFooterAdapterWrapper(RecyclerViewAdapter adapter) {
33 | super(adapter.getDisplayList());
34 | mAdapter = adapter;
35 | this.errorViewBinder = mAdapter.errorViewBinder;
36 | }
37 |
38 |
39 | private boolean isHeaderViewPos(int position) {
40 | return position < getHeadersCount();
41 | }
42 |
43 | private boolean isFooterViewPos(int position) {
44 | return position >= getHeadersCount() + mAdapter.getItemCount();
45 | }
46 |
47 | public int getHeadersCount() {
48 | return headerBinderList == null ? 0 : headerBinderList.size();
49 | }
50 |
51 | public int getFootersCount() {
52 | return footerBinderList == null ? 0 : footerBinderList.size();
53 | }
54 |
55 | public void addHeader(RecyclerViewBinder headerBinder) {
56 | if (headerBinderPool == null) {
57 | headerBinderPool = new SparseArrayCompat<>();
58 | headerBinderList = new ArrayList<>();
59 | }
60 | headerBinderPool.put(headerBinder.getItemLayoutId(this), headerBinder);
61 | headerBinderList.add(headerBinder);
62 | }
63 |
64 | public void addFooter(RecyclerViewBinder footerBinder) {
65 | if (footerBinderPool == null) {
66 | footerBinderPool = new SparseArrayCompat<>();
67 | footerBinderList = new ArrayList<>();
68 | }
69 | footerBinderPool.put(footerBinder.getItemLayoutId(this), footerBinder);
70 | footerBinderList.add(footerBinder);
71 | }
72 |
73 | @Override
74 | public int getItemViewType(int position) {
75 | if (errorViewBinder != null && errorViewBinder.showNow)
76 | return mAdapter.getItemViewType(position);
77 | if (mAdapter.getDisplayList().size() == 0)
78 | return mAdapter.getItemViewType(position);
79 | if (isHeaderViewPos(position)) {
80 | return headerBinderList.get(position).getItemLayoutId(this);
81 | } else if (isFooterViewPos(position)) {
82 | int index = position - getHeadersCount() - mAdapter.getItemCount();
83 | return footerBinderList.get(index)
84 | .getItemLayoutId(this);
85 | }
86 | return mAdapter.getItemViewType(position - getHeadersCount());
87 | }
88 |
89 | @Override
90 | public void swap(int fromPosition, int toPosition) {
91 | if (isHeaderViewPos(fromPosition) || isHeaderViewPos(toPosition) || isFooterViewPos(fromPosition) || isFooterViewPos(toPosition))
92 | return;
93 | mAdapter.swap(fromPosition - getHeadersCount(), toPosition - getHeadersCount());
94 | }
95 |
96 | @Override
97 | public void delete(int pos) {
98 | if (isHeaderViewPos(pos) || isFooterViewPos(pos))
99 | return;
100 | mAdapter.delete(pos - getHeadersCount());
101 | }
102 |
103 | @Override
104 | public void add(int pos, DataBean item) {
105 | if (isHeaderViewPos(pos) || isFooterViewPos(pos))
106 | return;
107 | mAdapter.add(pos - getHeadersCount(), item);
108 | }
109 |
110 | private RecyclerView.ViewHolder getHeaderViewHolder(int viewType, Context context, ViewGroup parent) {
111 | if (headerBinderPool == null)
112 | return null;
113 | RecyclerViewBinder viewBinder = headerBinderPool.get(viewType);
114 | if (viewBinder == null)
115 | return null;
116 | return viewBinder.provideViewHolder(LayoutInflater.from(context).inflate(viewBinder.getItemLayoutId(this), parent, false));
117 | }
118 |
119 | private RecyclerView.ViewHolder getFooterViewHolder(int viewType, Context context, ViewGroup parent) {
120 | if (footerBinderPool == null)
121 | return null;
122 | RecyclerViewBinder viewBinder = footerBinderPool.get(viewType);
123 | if (viewBinder == null)
124 | return null;
125 | return viewBinder.provideViewHolder(LayoutInflater.from(context).inflate(viewBinder.getItemLayoutId(this), parent, false));
126 | }
127 |
128 | @Override
129 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
130 | if (errorViewBinder != null && errorViewBinder.showNow) {
131 | return mAdapter.onCreateViewHolder(parent, viewType);
132 | }
133 | if (mAdapter.getDisplayList().size() == 0)
134 | return mAdapter.onCreateViewHolder(parent, viewType);
135 | Context context = parent.getContext();
136 | RecyclerView.ViewHolder viewHolder;
137 | viewHolder = getHeaderViewHolder(viewType, context, parent);
138 | if (viewHolder != null)
139 | return viewHolder;
140 | viewHolder = getFooterViewHolder(viewType, context, parent);
141 | if (viewHolder != null)
142 | return viewHolder;
143 | return mAdapter.onCreateViewHolder(parent, viewType);
144 | }
145 |
146 | @Override
147 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
148 | if (errorViewBinder != null && errorViewBinder.showNow) {
149 | mAdapter.onBindViewHolder(holder, position);
150 | return;
151 | }
152 | if (mAdapter.getDisplayList().size() == 0) {
153 | mAdapter.onBindViewHolder(holder, position);
154 | return;
155 | }
156 | if (isHeaderViewPos(position)) {
157 | headerBinderList.get(position).bindView(this, holder, position, null);
158 | return;
159 | }
160 | if (isFooterViewPos(position)) {
161 | int index = position - getHeadersCount() - mAdapter.getItemCount();
162 | footerBinderList.get(index).bindView(this, holder, index, null);
163 | return;
164 | }
165 | mAdapter.onBindViewHolder(holder, position - getHeadersCount());
166 | }
167 |
168 | @Override
169 | public int getItemCount() {
170 | if (errorViewBinder != null && errorViewBinder.showNow)
171 | return mAdapter.getItemCount();
172 | if (mAdapter.getDisplayList().size() == 0)
173 | return mAdapter.getItemCount();
174 | return mAdapter.getItemCount() + getHeadersCount() + getFootersCount();
175 | }
176 |
177 | @Override
178 | public void onAttachedToRecyclerView(RecyclerView recyclerView) {
179 | mAdapter.onAttachedToRecyclerView(recyclerView);
180 | RecyclerView.LayoutManager layoutManager = recyclerView.getLayoutManager();
181 | if (layoutManager instanceof GridLayoutManager) {
182 | final GridLayoutManager manager = (GridLayoutManager) layoutManager;
183 | manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
184 | @Override
185 | public int getSpanSize(int position) {
186 | return (isHeaderViewPos(position) || isFooterViewPos(position)) ?
187 | manager.getSpanCount() : 1;
188 | }
189 | });
190 | manager.setSpanCount(manager.getSpanCount());
191 | }
192 | }
193 |
194 | @Override
195 | public void setEmptyViewBinder(RecyclerViewBinder emptyViewBinder) {
196 | mAdapter.setEmptyViewBinder(emptyViewBinder);
197 | }
198 |
199 | @Override
200 | public void setErrorViewBinder(ErrorRecyclerViewBinder errorViewBinder) {
201 | mAdapter.setErrorViewBinder(errorViewBinder);
202 | this.errorViewBinder = mAdapter.errorViewBinder;
203 | }
204 |
205 | @Override
206 | public void showErrorView(RecyclerView recyclerView) {
207 | mAdapter.showErrorView(recyclerView);
208 | }
209 |
210 | @Override
211 | public void hideErrorView(RecyclerView recyclerView) {
212 | mAdapter.hideErrorView(recyclerView);
213 | }
214 |
215 | @Override
216 | public void onViewAttachedToWindow(RecyclerView.ViewHolder holder) {
217 | mAdapter.onViewAttachedToWindow(holder);
218 | int position = holder.getLayoutPosition();
219 | if (isHeaderViewPos(position) || isFooterViewPos(position)) {
220 | ViewGroup.LayoutParams lp = holder.itemView.getLayoutParams();
221 | if (lp != null
222 | && lp instanceof StaggeredGridLayoutManager.LayoutParams) {
223 | StaggeredGridLayoutManager.LayoutParams p =
224 | (StaggeredGridLayoutManager.LayoutParams) lp;
225 | p.setFullSpan(true);
226 | }
227 | }
228 | }
229 |
230 |
231 | }
232 |
--------------------------------------------------------------------------------
/nolistadapter-rv/src/main/java/com/tellh/nolistadapter/adapter/RecyclerViewAdapter.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadapter.adapter;
2 |
3 | import android.support.annotation.LayoutRes;
4 | import android.support.v4.util.SparseArrayCompat;
5 | import android.support.v7.widget.RecyclerView;
6 | import android.view.LayoutInflater;
7 | import android.view.View;
8 | import android.view.ViewGroup;
9 |
10 | import com.tellh.nolistadapter.DataBean;
11 | import com.tellh.nolistadapter.adapter.FooterLoadMoreAdapterWrapper.OnReachFooterListener;
12 | import com.tellh.nolistadapter.viewbinder.base.RecyclerViewBinder;
13 | import com.tellh.nolistadapter.viewbinder.sub.EmptyRecyclerViewBinder;
14 | import com.tellh.nolistadapter.viewbinder.sub.ErrorRecyclerViewBinder;
15 | import com.tellh.nolistadapter.viewbinder.sub.FooterRecyclerViewBinder;
16 | import com.tellh.nolistadapter.viewbinder.sub.HeaderRecyclerViewBinder;
17 |
18 | import java.util.ArrayList;
19 | import java.util.Collections;
20 | import java.util.List;
21 |
22 |
23 | /**
24 | * Created by tlh on 2016/9/12 :)
25 | */
26 | public class RecyclerViewAdapter extends RecyclerView.Adapter implements IListAdapter_RV {
27 | private static int SIZE_VIEW_BINDER_POOL = 10;
28 | private RecyclerViewBinder viewBinderCache;
29 |
30 | private RecyclerViewBinder emptyViewBinder;
31 | protected ErrorRecyclerViewBinder errorViewBinder;
32 |
33 | private SparseArrayCompat viewBinderPool;
34 | protected List displayList;
35 |
36 | public RecyclerViewAdapter(List displayList) {
37 | viewBinderPool = new SparseArrayCompat<>(SIZE_VIEW_BINDER_POOL);
38 | if (displayList == null)
39 | displayList = new ArrayList<>();
40 | this.displayList = displayList;
41 | }
42 |
43 | @Override
44 | public List getDisplayList() {
45 | return displayList;
46 | }
47 |
48 | @Override
49 | public int getItemViewType(int position) {
50 | //error view
51 | if (errorViewBinder != null && errorViewBinder.showNow)
52 | return errorViewBinder.getItemLayoutId(this);
53 | //empty view
54 | if (displayList.size() == 0) {
55 | return emptyViewBinder != null ? emptyViewBinder.getItemLayoutId(this) : super.getItemViewType(position);
56 | }
57 | //normal view
58 | return displayList.get(position).getItemLayoutId(this);
59 | }
60 |
61 |
62 | @Override
63 | public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
64 | RecyclerViewBinder viewBinder = getViewBinder(viewType);
65 | View itemView = LayoutInflater.from(parent.getContext())
66 | .inflate(viewBinder.getItemLayoutId(this), parent, false);
67 | return viewBinder.provideViewHolder(itemView);
68 | }
69 |
70 | private RecyclerViewBinder getViewBinder(int viewType) {
71 | //error view
72 | if (errorViewBinder != null && errorViewBinder.showNow && errorViewBinder.getItemLayoutId(this) == viewType)
73 | return errorViewBinder;
74 | //empty view
75 | if (displayList.size() == 0 && emptyViewBinder != null && viewType == emptyViewBinder.getItemLayoutId(this))
76 | return emptyViewBinder;
77 | //In most situation, item type in a list could be only one. So I cache this binder.
78 | RecyclerViewBinder viewBinder;
79 | if (viewBinderPool.size() == 1) {
80 | if (viewBinderCache == null)
81 | viewBinder = viewBinderCache = viewBinderPool.get(viewType);
82 | else viewBinder = viewBinderCache;
83 | } else {
84 | viewBinder = viewBinderPool.get(viewType);
85 | }
86 | return viewBinder;
87 | }
88 |
89 | @Override
90 | public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
91 | //error view
92 | if (errorViewBinder != null && errorViewBinder.showNow) {
93 | errorViewBinder.bindView(this, (RecyclerViewBinder.ViewHolder) holder, position, null);
94 | return;
95 | }
96 | //empty view
97 | if (displayList.size() == 0) {
98 | if (emptyViewBinder != null)
99 | emptyViewBinder.bindView(this, holder, position, null);
100 | return;
101 | }
102 | //normal view
103 | DataBean dataBean = displayList.get(position);
104 | if (viewBinderCache != null) {
105 | viewBinderCache.bindView(this, holder, position, dataBean);
106 | return;
107 | }
108 | dataBean.provideViewBinder(this, viewBinderPool, position).bindView(this, holder, position, dataBean);
109 | }
110 |
111 | @Override
112 | public int getItemCount() {
113 | if (errorViewBinder != null && errorViewBinder.showNow)
114 | return 1;
115 | if (emptyViewBinder != null && displayList.size() == 0)
116 | return 1;
117 | return displayList == null ? 0 : displayList.size();
118 | }
119 |
120 | public RecyclerViewBinder findViewBinderFromPool(@LayoutRes int layoutId) {
121 | return viewBinderPool.get(layoutId);
122 | }
123 |
124 | public static void setViewBinderPoolInitSize(int size) {
125 | SIZE_VIEW_BINDER_POOL = size;
126 | }
127 |
128 | public void clearViewBinderCache() {
129 | viewBinderPool.clear();
130 | }
131 |
132 | @Override
133 | public void addAll(List extends DataBean> list) {
134 | if (list == null)
135 | return;
136 | displayList.addAll(list);
137 | notifyDataSetChanged();
138 | }
139 |
140 | @Override
141 | public void refresh(List extends DataBean> list) {
142 | if (list == null)
143 | return;
144 | displayList.clear();
145 | displayList.addAll(list);
146 | notifyDataSetChanged();
147 | }
148 |
149 | @Override
150 | public void add(int pos, DataBean item) {
151 | displayList.add(pos, item);
152 | notifyItemInserted(pos);
153 | }
154 |
155 | @Override
156 | public void delete(int pos) {
157 | displayList.remove(pos);
158 | notifyItemRemoved(pos);
159 | }
160 |
161 | @Override
162 | public void swap(int fromPosition, int toPosition) {
163 | Collections.swap(displayList, fromPosition, toPosition);
164 | notifyItemMoved(fromPosition, toPosition);
165 | }
166 |
167 | @Override
168 | public void clear(RecyclerView recyclerView) {
169 | displayList.clear();
170 | notifyDataSetChanged();
171 | recyclerView.scrollToPosition(0);
172 | }
173 |
174 | public boolean isErrorViewShowing() {
175 | return errorViewBinder != null && errorViewBinder.showNow;
176 | }
177 |
178 | @Override
179 | public void showErrorView(RecyclerView recyclerView) {
180 | if (errorViewBinder == null || isErrorViewShowing())
181 | return;
182 | errorViewBinder.showNow = true;
183 | notifyDataSetChanged();
184 | recyclerView.scrollToPosition(0);
185 | }
186 |
187 | @Override
188 | public void hideErrorView(RecyclerView recyclerView) {
189 | if (errorViewBinder == null && !isErrorViewShowing())
190 | return;
191 | errorViewBinder.showNow = false;
192 | notifyDataSetChanged();
193 | recyclerView.scrollToPosition(0);
194 | }
195 |
196 | public void setEmptyViewBinder(RecyclerViewBinder emptyViewBinder) {
197 | this.emptyViewBinder = emptyViewBinder;
198 | }
199 |
200 | public void setErrorViewBinder(ErrorRecyclerViewBinder errorViewBinder) {
201 | this.errorViewBinder = errorViewBinder;
202 | }
203 |
204 | public static Builder builder() {
205 | return new Builder();
206 | }
207 |
208 | public static class Builder {
209 |
210 | private RecyclerViewAdapter adapter;
211 |
212 | private HeaderAndFooterAdapterWrapper headerAndFooterAdapterWrapper;
213 |
214 | public Builder() {
215 | adapter = new RecyclerViewAdapter(null);
216 | }
217 |
218 | public Builder displayList(List extends DataBean> displayList) {
219 | List adapterList = adapter.getDisplayList();
220 | for (DataBean dataBean : displayList) {
221 | adapterList.add(dataBean);
222 | }
223 | return this;
224 | }
225 |
226 | public Builder addItemType(RecyclerViewBinder viewBinder) {
227 | adapter.viewBinderPool.put(viewBinder.getItemLayoutId(adapter), viewBinder);
228 | return this;
229 | }
230 |
231 | public Builder addHeader(HeaderRecyclerViewBinder viewBinder) {
232 | initHFAdapterWrapper();
233 | headerAndFooterAdapterWrapper.addHeader(viewBinder);
234 | return this;
235 | }
236 |
237 | public Builder addFooter(FooterRecyclerViewBinder viewBinder) {
238 | initHFAdapterWrapper();
239 | headerAndFooterAdapterWrapper.addFooter(viewBinder);
240 | return this;
241 | }
242 |
243 | public Builder setEmptyView(EmptyRecyclerViewBinder viewBinder) {
244 | adapter.setEmptyViewBinder(viewBinder);
245 | return this;
246 | }
247 |
248 | public Builder setErrorView(ErrorRecyclerViewBinder viewBinder) {
249 | adapter.setErrorViewBinder(viewBinder);
250 | return this;
251 | }
252 |
253 | //This load more footer should only be added once.
254 | public Builder setLoadMoreFooter(FooterRecyclerViewBinder viewBinder, RecyclerView recyclerView, final OnReachFooterListener listener) {
255 | FooterLoadMoreAdapterWrapper footerLoadMoreAdapterWrapper = new FooterLoadMoreAdapterWrapper(adapter, recyclerView, listener);
256 | footerLoadMoreAdapterWrapper.addFooter(viewBinder);
257 | adapter = footerLoadMoreAdapterWrapper;
258 | return this;
259 | }
260 |
261 | public RecyclerViewAdapter build() {
262 | return adapter;
263 | }
264 |
265 | private void initHFAdapterWrapper() {
266 | if (headerAndFooterAdapterWrapper == null) {
267 | headerAndFooterAdapterWrapper = new HeaderAndFooterAdapterWrapper(adapter);
268 | adapter = headerAndFooterAdapterWrapper;
269 | }
270 | }
271 |
272 |
273 | }
274 | }
275 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # NoListAdapter
2 | [](https://jitpack.io/#TellH/NoListAdapter)
3 |
4 | A more elegant and easy way to build an multifunctional adapter for ListView or RecyclerView in Android.
5 | ###Why NoListAdapter?
6 | Using this library, you don't even have to write an adapter for a ListView or RecyclerView. When using RecyclerView, I found it is not convenient and elegant to realise multi-type item. Moreover, there is no native way to set empty view, header, footer, load more footer and error view in RecyclerView. Although we have many implementations, I think adapter is quite qualified for those task.
7 | ## What it can do?
8 | - Easy to Add Multi-type item to RecyclerView and ListView.
9 | - Easy to set empty view in RecyclerView.
10 | - Easy to add header and footer in RecyclerView.
11 | - Easy to set Load More Footer in RecyclerView.
12 | - Easy to show or hide error view in RecyclerView.
13 |
14 |
15 | ## How to do?
16 | ### SetUp
17 | In project build.gradle
18 | ``` groovy
19 | allprojects {
20 | repositories {
21 | maven { url "https://jitpack.io" }
22 | }
23 | }
24 | ```
25 | In app module build.gradle
26 | ``` groovy
27 | dependencies {
28 | //if you want to use in listview, add this line.
29 | compile 'com.github.TellH.NoListAdapter:nolistadapter-lv:1.0.2'
30 | //if you want to use in recyclerview, add this line.
31 | compile 'com.github.TellH.NoListAdapter:nolistadapter-rv:1.0.2'
32 | }
33 | ```
34 | ### Quick Start
35 | 1 . Make your data entity class extends DataBean and attach item layout id to it. like:
36 | ``` java
37 | public class User extends DataBean {
38 | private String login;
39 | private int id;
40 | //...
41 | @Override
42 | public int getItemLayoutId(IListAdapter adapter) {
43 | return R.layout.item_user;
44 | }
45 | // setter and getter omitted.
46 | //...
47 | }
48 | ```
49 | 2 . Create ViewBinder and VIewHolder for an item type.
50 | i.e. for RecyclerView
51 | ``` java
52 | public class UserRecyclerViewBinder extends RecyclerViewBinder {
53 | @Override
54 | public ViewHolder provideViewHolder(View itemView) {
55 | return new UserRecyclerViewBinder.ViewHolder(itemView);
56 | }
57 |
58 | @Override
59 | public void bindView(IListAdapter adapter, UserRecyclerViewBinder.ViewHolder holder, int position, User entity) {
60 | holder.tvId.setText(String.valueOf(entity.getId()));
61 | holder.tvName.setText(entity.getLogin());
62 | holder.tvUrl.setText(entity.getHtml_url());
63 | }
64 |
65 | @Override
66 | public int getItemLayoutId(IListAdapter adapter) {
67 | return R.layout.item_user;
68 | }
69 |
70 | protected class ViewHolder extends RecyclerViewBinder.ViewHolder {
71 | public TextView tvId;
72 | public TextView tvName;
73 | public TextView tvUrl;
74 | public ViewHolder(View rootView) {
75 | super(rootView);
76 | this.tvId = findViewById(R.id.tv_id);
77 | this.tvName = findViewById(R.id.tv_name);
78 | this.tvUrl = findViewById(R.id.tv_url);
79 | }
80 |
81 | }
82 | }
83 | ```
84 | ###
85 | [Creatre ViewBinder sample for ListView](https://github.com/TellH/NoListAdapter/blob/master/app/src/main/java/com/tellh/nolistadaptersample/lv/UserListViewBinder.java)
86 |
87 | 3 . Build an Adapter.
88 | i.e. for RecyclerView
89 | ``` java
90 | List userList = response.getItems();
91 | adapter = RecyclerViewAdapter.builder()
92 | .displayList(userList)
93 | .addItemType(new UserRecyclerViewBinder())
94 | .build();
95 | list.setAdapter(adapter);
96 | ```
97 | [Build an Adapter for ListView](https://github.com/TellH/NoListAdapter/blob/master/app/src/main/java/com/tellh/nolistadaptersample/ListViewActivity.java)
98 |
99 | ### Multi-Type Item
100 | Just Create DataBean and ViewBinder for each Item type and add it to your Adapter Builder.
101 | ``` java
102 | List userList = response.getItems();
103 | List displayList = new ArrayList<>();
104 | for (int i = 0; i < userList.size(); i++) {
105 | displayList.add(new ImageItem(userList.get(i).getAvatar_url()));
106 | displayList.add(userList.get(i));
107 | }
108 | adapter = RecyclerViewAdapter.builder()
109 | .displayList(displayList)
110 | .addItemType(new UserRecyclerViewBinder()) //different item type have different ways to bind data to ViewHolder.
111 | .addItemType(new ImageItemRecyclerViewBinder())
112 | .build();
113 | ```
114 | ### Empty View, Header and Footer
115 | Create ViewBinder
116 | ``` java
117 | public class EmptyBinder extends EmptyRecyclerViewBinder
118 | public class HeaderBinder extends HeaderRecyclerViewBinder
119 | public class FooterBinder extends FooterRecyclerViewBinder
120 | ```
121 | Add it to your Adapter Builder
122 | ``` java
123 | adapter = RecyclerViewAdapter.builder()
124 | //...
125 | .setEmptyView(new EmptyBinder())
126 | .addHeader(new HeaderBinder("I am the first header! 我是沙发"))
127 | .addHeader(new HeaderBinder("I am the second header! 我是板凳"))
128 | .addFooter(new FooterBinder("------I am the footer!------"))
129 | .addFooter(new FooterBinder("------我是有底线的!-------"))
130 | //...
131 | .build();
132 | ```
133 | If you just want to show Empty View, use EasyEmptyRecyclerViewBinder
134 | ``` java
135 | .setEmptyView(new EasyEmptyRecyclerViewBinder(R.layout.empty_view))
136 | ```
137 | 
138 | ### Error View
139 | Create ViewBinder
140 | ``` java
141 | public class ErrorBinder extends ErrorRecyclerViewBinder
142 | ```
143 | Add it to your Adapter Builder
144 | ``` java
145 | .setErrorView(new ErrorBinder(this))
146 | ```
147 | Then show and hide Error View if you want.
148 | ``` java
149 | adapter.showErrorView(recyclerView);
150 | adapter.hideErrorView(recyclerView);
151 | ```
152 |
153 | 
154 |
155 | ### Load More Footer
156 | Create Footer ViewBinder, Check out more information in this [sample](https://github.com/TellH/NoListAdapter/blob/master/app/src/main/java/com/tellh/nolistadaptersample/rv/LoadMoreFooterBinderRecycler.java).
157 | ``` java
158 | public class LoadMoreFooterBinderRecycler extends FooterRecyclerViewBinder {
159 | @Override
160 | protected void bindFooter(IListAdapter adapter, ViewHolder holder, int position) {
161 | FooterLoadMoreAdapterWrapper adapterWrapper = (FooterLoadMoreAdapterWrapper) adapter;
162 | if (adapter.getDisplayList().size() == 0) {
163 | holder.progressBar.setVisibility(View.INVISIBLE);
164 | holder.tvFooter.setText("No Data");
165 | return;
166 | }
167 | switch (adapterWrapper.getFooterStatus()) {
168 | case PULL_TO_LOAD_MORE:
169 | holder.progressBar.setVisibility(View.VISIBLE);
170 | holder.tvFooter.setText(toLoadText);
171 | break;
172 | case LOADING:
173 | holder.progressBar.setVisibility(View.VISIBLE);
174 | holder.tvFooter.setText(loadingText);
175 | break;
176 | case NO_MORE:
177 | holder.tvFooter.setText(noMoreText);
178 | holder.progressBar.setVisibility(View.INVISIBLE);
179 | break;
180 | }
181 | holder.ivFooter.setImageResource(R.mipmap.ic_launcher);
182 | }
183 | // Remainder omitted
184 | }
185 | ```
186 | Add it to your Adapter Builder:
187 | ``` java
188 | adapter = RecyclerViewAdapter.builder()
189 | .addHeader(new HeaderBinder("I am the first header! 我是沙发"))
190 | .addFooter(new FooterBinder("------I am the footer!------"))
191 | .setLoadMoreFooter(new LoadMoreFooterBinderRecycler(), list, new OnReachFooterListener() {
192 | @Override
193 | public void onToLoadMore(int i) {
194 | // to load more data.
195 | }
196 | })
197 | .build();
198 | ```
199 | Note: setLoadMoreFooter should be added behind addHeader and addFooter.
200 |
201 | When getting Refresh or Load More data, just call FooterLoadMoreAdapterWrapper#OnGetData, it will handle pagination for you.
202 | ``` java
203 | public void onGetRefreshData() {
204 | FooterLoadMoreAdapterWrapper footerLoadMoreAdapterWrapper = (FooterLoadMoreAdapterWrapper) adapter;
205 | footerLoadMoreAdapterWrapper.OnGetData(displayList, REFRESH);
206 | refreshLayout.setRefreshing(false);
207 | }
208 |
209 | public void onGetLoadMoreData(DataBean displayList) {
210 | FooterLoadMoreAdapterWrapper footerLoadMoreAdapterWrapper = (FooterLoadMoreAdapterWrapper) adapter;
211 | footerLoadMoreAdapterWrapper.OnGetData(displayList, LOAD_MORE);
212 | }
213 | ```
214 |
215 | 
216 |
217 | ## How it works?
218 | No mater in ListView or RecyclerView, the adapter is in charge of providing view holder and binding data to each item view. Furthermore, different type items with different layout ids should have different data beans and different ways for databinding. So it would be more fixable and elegant to separate business code of binding data and providing view holder from the adapter. Instead, ViewBinder will handle those task.
219 |
220 | 
221 |
222 | DataBean holds the data and an item layout id. With layout id, it provides ViewBinder to bind data to item view in Adapter's method such as onBindViewHolder in RecyclerView and getView in ListView.
223 |
224 | 
225 |
226 | ## License
227 | Copyright 2016 TellH
228 |
229 | Licensed under the Apache License, Version 2.0 (the "License");
230 | you may not use this file except in compliance with the License.
231 | You may obtain a copy of the License at
232 |
233 | http://www.apache.org/licenses/LICENSE-2.0
234 |
235 | Unless required by applicable law or agreed to in writing, software
236 | distributed under the License is distributed on an "AS IS" BASIS,
237 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
238 | See the License for the specific language governing permissions and
239 | limitations under the License.
240 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/app/src/main/java/com/tellh/nolistadaptersample/bean/Response.java:
--------------------------------------------------------------------------------
1 | package com.tellh.nolistadaptersample.bean;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * Created by tlh on 2016/9/12 :)
7 | */
8 | public class Response {
9 |
10 | private List items;
11 |
12 | public List getItems() {
13 | return items;
14 | }
15 |
16 | public void setItems(List items) {
17 | this.items = items;
18 | }
19 |
20 | public static String responseJsonPage1 = "{\"items\": [\n" +
21 | " {\n" +
22 | " \"login\": \"JakeWharton\",\n" +
23 | " \"id\": 66577,\n" +
24 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/66577?v=3\",\n" +
25 | " \"gravatar_id\": \"\",\n" +
26 | " \"url\": \"https://api.github.com/users/JakeWharton\",\n" +
27 | " \"html_url\": \"https://github.com/JakeWharton\",\n" +
28 | " \"followers_url\": \"https://api.github.com/users/JakeWharton/followers\",\n" +
29 | " \"following_url\": \"https://api.github.com/users/JakeWharton/following{/other_user}\",\n" +
30 | " \"gists_url\": \"https://api.github.com/users/JakeWharton/gists{/gist_id}\",\n" +
31 | " \"starred_url\": \"https://api.github.com/users/JakeWharton/starred{/owner}{/repo}\",\n" +
32 | " \"subscriptions_url\": \"https://api.github.com/users/JakeWharton/subscriptions\",\n" +
33 | " \"organizations_url\": \"https://api.github.com/users/JakeWharton/orgs\",\n" +
34 | " \"repos_url\": \"https://api.github.com/users/JakeWharton/repos\",\n" +
35 | " \"events_url\": \"https://api.github.com/users/JakeWharton/events{/privacy}\",\n" +
36 | " \"received_events_url\": \"https://api.github.com/users/JakeWharton/received_events\",\n" +
37 | " \"type\": \"User\",\n" +
38 | " \"site_admin\": false,\n" +
39 | " \"score\": 1.0\n" +
40 | " },\n" +
41 | " {\n" +
42 | " \"login\": \"Trinea\",\n" +
43 | " \"id\": 1169522,\n" +
44 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/1169522?v=3\",\n" +
45 | " \"gravatar_id\": \"\",\n" +
46 | " \"url\": \"https://api.github.com/users/Trinea\",\n" +
47 | " \"html_url\": \"https://github.com/Trinea\",\n" +
48 | " \"followers_url\": \"https://api.github.com/users/Trinea/followers\",\n" +
49 | " \"following_url\": \"https://api.github.com/users/Trinea/following{/other_user}\",\n" +
50 | " \"gists_url\": \"https://api.github.com/users/Trinea/gists{/gist_id}\",\n" +
51 | " \"starred_url\": \"https://api.github.com/users/Trinea/starred{/owner}{/repo}\",\n" +
52 | " \"subscriptions_url\": \"https://api.github.com/users/Trinea/subscriptions\",\n" +
53 | " \"organizations_url\": \"https://api.github.com/users/Trinea/orgs\",\n" +
54 | " \"repos_url\": \"https://api.github.com/users/Trinea/repos\",\n" +
55 | " \"events_url\": \"https://api.github.com/users/Trinea/events{/privacy}\",\n" +
56 | " \"received_events_url\": \"https://api.github.com/users/Trinea/received_events\",\n" +
57 | " \"type\": \"User\",\n" +
58 | " \"site_admin\": false,\n" +
59 | " \"score\": 1.0\n" +
60 | " },\n" +
61 | " {\n" +
62 | " \"login\": \"chrisbanes\",\n" +
63 | " \"id\": 227486,\n" +
64 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/227486?v=3\",\n" +
65 | " \"gravatar_id\": \"\",\n" +
66 | " \"url\": \"https://api.github.com/users/chrisbanes\",\n" +
67 | " \"html_url\": \"https://github.com/chrisbanes\",\n" +
68 | " \"followers_url\": \"https://api.github.com/users/chrisbanes/followers\",\n" +
69 | " \"following_url\": \"https://api.github.com/users/chrisbanes/following{/other_user}\",\n" +
70 | " \"gists_url\": \"https://api.github.com/users/chrisbanes/gists{/gist_id}\",\n" +
71 | " \"starred_url\": \"https://api.github.com/users/chrisbanes/starred{/owner}{/repo}\",\n" +
72 | " \"subscriptions_url\": \"https://api.github.com/users/chrisbanes/subscriptions\",\n" +
73 | " \"organizations_url\": \"https://api.github.com/users/chrisbanes/orgs\",\n" +
74 | " \"repos_url\": \"https://api.github.com/users/chrisbanes/repos\",\n" +
75 | " \"events_url\": \"https://api.github.com/users/chrisbanes/events{/privacy}\",\n" +
76 | " \"received_events_url\": \"https://api.github.com/users/chrisbanes/received_events\",\n" +
77 | " \"type\": \"User\",\n" +
78 | " \"site_admin\": false,\n" +
79 | " \"score\": 1.0\n" +
80 | " },\n" +
81 | " {\n" +
82 | " \"login\": \"romannurik\",\n" +
83 | " \"id\": 100155,\n" +
84 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/100155?v=3\",\n" +
85 | " \"gravatar_id\": \"\",\n" +
86 | " \"url\": \"https://api.github.com/users/romannurik\",\n" +
87 | " \"html_url\": \"https://github.com/romannurik\",\n" +
88 | " \"followers_url\": \"https://api.github.com/users/romannurik/followers\",\n" +
89 | " \"following_url\": \"https://api.github.com/users/romannurik/following{/other_user}\",\n" +
90 | " \"gists_url\": \"https://api.github.com/users/romannurik/gists{/gist_id}\",\n" +
91 | " \"starred_url\": \"https://api.github.com/users/romannurik/starred{/owner}{/repo}\",\n" +
92 | " \"subscriptions_url\": \"https://api.github.com/users/romannurik/subscriptions\",\n" +
93 | " \"organizations_url\": \"https://api.github.com/users/romannurik/orgs\",\n" +
94 | " \"repos_url\": \"https://api.github.com/users/romannurik/repos\",\n" +
95 | " \"events_url\": \"https://api.github.com/users/romannurik/events{/privacy}\",\n" +
96 | " \"received_events_url\": \"https://api.github.com/users/romannurik/received_events\",\n" +
97 | " \"type\": \"User\",\n" +
98 | " \"site_admin\": false,\n" +
99 | " \"score\": 1.0\n" +
100 | " },\n" +
101 | " {\n" +
102 | " \"login\": \"koush\",\n" +
103 | " \"id\": 73924,\n" +
104 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/73924?v=3\",\n" +
105 | " \"gravatar_id\": \"\",\n" +
106 | " \"url\": \"https://api.github.com/users/koush\",\n" +
107 | " \"html_url\": \"https://github.com/koush\",\n" +
108 | " \"followers_url\": \"https://api.github.com/users/koush/followers\",\n" +
109 | " \"following_url\": \"https://api.github.com/users/koush/following{/other_user}\",\n" +
110 | " \"gists_url\": \"https://api.github.com/users/koush/gists{/gist_id}\",\n" +
111 | " \"starred_url\": \"https://api.github.com/users/koush/starred{/owner}{/repo}\",\n" +
112 | " \"subscriptions_url\": \"https://api.github.com/users/koush/subscriptions\",\n" +
113 | " \"organizations_url\": \"https://api.github.com/users/koush/orgs\",\n" +
114 | " \"repos_url\": \"https://api.github.com/users/koush/repos\",\n" +
115 | " \"events_url\": \"https://api.github.com/users/koush/events{/privacy}\",\n" +
116 | " \"received_events_url\": \"https://api.github.com/users/koush/received_events\",\n" +
117 | " \"type\": \"User\",\n" +
118 | " \"site_admin\": false,\n" +
119 | " \"score\": 1.0\n" +
120 | " },\n" +
121 | " {\n" +
122 | " \"login\": \"commonsguy\",\n" +
123 | " \"id\": 103772,\n" +
124 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/103772?v=3\",\n" +
125 | " \"gravatar_id\": \"\",\n" +
126 | " \"url\": \"https://api.github.com/users/commonsguy\",\n" +
127 | " \"html_url\": \"https://github.com/commonsguy\",\n" +
128 | " \"followers_url\": \"https://api.github.com/users/commonsguy/followers\",\n" +
129 | " \"following_url\": \"https://api.github.com/users/commonsguy/following{/other_user}\",\n" +
130 | " \"gists_url\": \"https://api.github.com/users/commonsguy/gists{/gist_id}\",\n" +
131 | " \"starred_url\": \"https://api.github.com/users/commonsguy/starred{/owner}{/repo}\",\n" +
132 | " \"subscriptions_url\": \"https://api.github.com/users/commonsguy/subscriptions\",\n" +
133 | " \"organizations_url\": \"https://api.github.com/users/commonsguy/orgs\",\n" +
134 | " \"repos_url\": \"https://api.github.com/users/commonsguy/repos\",\n" +
135 | " \"events_url\": \"https://api.github.com/users/commonsguy/events{/privacy}\",\n" +
136 | " \"received_events_url\": \"https://api.github.com/users/commonsguy/received_events\",\n" +
137 | " \"type\": \"User\",\n" +
138 | " \"site_admin\": false,\n" +
139 | " \"score\": 1.0\n" +
140 | " },\n" +
141 | " {\n" +
142 | " \"login\": \"hongyangAndroid\",\n" +
143 | " \"id\": 10704521,\n" +
144 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/10704521?v=3\",\n" +
145 | " \"gravatar_id\": \"\",\n" +
146 | " \"url\": \"https://api.github.com/users/hongyangAndroid\",\n" +
147 | " \"html_url\": \"https://github.com/hongyangAndroid\",\n" +
148 | " \"followers_url\": \"https://api.github.com/users/hongyangAndroid/followers\",\n" +
149 | " \"following_url\": \"https://api.github.com/users/hongyangAndroid/following{/other_user}\",\n" +
150 | " \"gists_url\": \"https://api.github.com/users/hongyangAndroid/gists{/gist_id}\",\n" +
151 | " \"starred_url\": \"https://api.github.com/users/hongyangAndroid/starred{/owner}{/repo}\",\n" +
152 | " \"subscriptions_url\": \"https://api.github.com/users/hongyangAndroid/subscriptions\",\n" +
153 | " \"organizations_url\": \"https://api.github.com/users/hongyangAndroid/orgs\",\n" +
154 | " \"repos_url\": \"https://api.github.com/users/hongyangAndroid/repos\",\n" +
155 | " \"events_url\": \"https://api.github.com/users/hongyangAndroid/events{/privacy}\",\n" +
156 | " \"received_events_url\": \"https://api.github.com/users/hongyangAndroid/received_events\",\n" +
157 | " \"type\": \"User\",\n" +
158 | " \"site_admin\": false,\n" +
159 | " \"score\": 1.0\n" +
160 | " },\n" +
161 | " {\n" +
162 | " \"login\": \"romainguy\",\n" +
163 | " \"id\": 869684,\n" +
164 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/869684?v=3\",\n" +
165 | " \"gravatar_id\": \"\",\n" +
166 | " \"url\": \"https://api.github.com/users/romainguy\",\n" +
167 | " \"html_url\": \"https://github.com/romainguy\",\n" +
168 | " \"followers_url\": \"https://api.github.com/users/romainguy/followers\",\n" +
169 | " \"following_url\": \"https://api.github.com/users/romainguy/following{/other_user}\",\n" +
170 | " \"gists_url\": \"https://api.github.com/users/romainguy/gists{/gist_id}\",\n" +
171 | " \"starred_url\": \"https://api.github.com/users/romainguy/starred{/owner}{/repo}\",\n" +
172 | " \"subscriptions_url\": \"https://api.github.com/users/romainguy/subscriptions\",\n" +
173 | " \"organizations_url\": \"https://api.github.com/users/romainguy/orgs\",\n" +
174 | " \"repos_url\": \"https://api.github.com/users/romainguy/repos\",\n" +
175 | " \"events_url\": \"https://api.github.com/users/romainguy/events{/privacy}\",\n" +
176 | " \"received_events_url\": \"https://api.github.com/users/romainguy/received_events\",\n" +
177 | " \"type\": \"User\",\n" +
178 | " \"site_admin\": false,\n" +
179 | " \"score\": 1.0\n" +
180 | " },\n" +
181 | " {\n" +
182 | " \"login\": \"singwhatiwanna\",\n" +
183 | " \"id\": 3346272,\n" +
184 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/3346272?v=3\",\n" +
185 | " \"gravatar_id\": \"\",\n" +
186 | " \"url\": \"https://api.github.com/users/singwhatiwanna\",\n" +
187 | " \"html_url\": \"https://github.com/singwhatiwanna\",\n" +
188 | " \"followers_url\": \"https://api.github.com/users/singwhatiwanna/followers\",\n" +
189 | " \"following_url\": \"https://api.github.com/users/singwhatiwanna/following{/other_user}\",\n" +
190 | " \"gists_url\": \"https://api.github.com/users/singwhatiwanna/gists{/gist_id}\",\n" +
191 | " \"starred_url\": \"https://api.github.com/users/singwhatiwanna/starred{/owner}{/repo}\",\n" +
192 | " \"subscriptions_url\": \"https://api.github.com/users/singwhatiwanna/subscriptions\",\n" +
193 | " \"organizations_url\": \"https://api.github.com/users/singwhatiwanna/orgs\",\n" +
194 | " \"repos_url\": \"https://api.github.com/users/singwhatiwanna/repos\",\n" +
195 | " \"events_url\": \"https://api.github.com/users/singwhatiwanna/events{/privacy}\",\n" +
196 | " \"received_events_url\": \"https://api.github.com/users/singwhatiwanna/received_events\",\n" +
197 | " \"type\": \"User\",\n" +
198 | " \"site_admin\": false,\n" +
199 | " \"score\": 1.0\n" +
200 | " },\n" +
201 | " {\n" +
202 | " \"login\": \"kevinsawicki\",\n" +
203 | " \"id\": 671378,\n" +
204 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/671378?v=3\",\n" +
205 | " \"gravatar_id\": \"\",\n" +
206 | " \"url\": \"https://api.github.com/users/kevinsawicki\",\n" +
207 | " \"html_url\": \"https://github.com/kevinsawicki\",\n" +
208 | " \"followers_url\": \"https://api.github.com/users/kevinsawicki/followers\",\n" +
209 | " \"following_url\": \"https://api.github.com/users/kevinsawicki/following{/other_user}\",\n" +
210 | " \"gists_url\": \"https://api.github.com/users/kevinsawicki/gists{/gist_id}\",\n" +
211 | " \"starred_url\": \"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}\",\n" +
212 | " \"subscriptions_url\": \"https://api.github.com/users/kevinsawicki/subscriptions\",\n" +
213 | " \"organizations_url\": \"https://api.github.com/users/kevinsawicki/orgs\",\n" +
214 | " \"repos_url\": \"https://api.github.com/users/kevinsawicki/repos\",\n" +
215 | " \"events_url\": \"https://api.github.com/users/kevinsawicki/events{/privacy}\",\n" +
216 | " \"received_events_url\": \"https://api.github.com/users/kevinsawicki/received_events\",\n" +
217 | " \"type\": \"User\",\n" +
218 | " \"site_admin\": true,\n" +
219 | " \"score\": 1.0\n" +
220 | " },\n" +
221 | " {\n" +
222 | " \"login\": \"cyrilmottier\",\n" +
223 | " \"id\": 92794,\n" +
224 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/92794?v=3\",\n" +
225 | " \"gravatar_id\": \"\",\n" +
226 | " \"url\": \"https://api.github.com/users/cyrilmottier\",\n" +
227 | " \"html_url\": \"https://github.com/cyrilmottier\",\n" +
228 | " \"followers_url\": \"https://api.github.com/users/cyrilmottier/followers\",\n" +
229 | " \"following_url\": \"https://api.github.com/users/cyrilmottier/following{/other_user}\",\n" +
230 | " \"gists_url\": \"https://api.github.com/users/cyrilmottier/gists{/gist_id}\",\n" +
231 | " \"starred_url\": \"https://api.github.com/users/cyrilmottier/starred{/owner}{/repo}\",\n" +
232 | " \"subscriptions_url\": \"https://api.github.com/users/cyrilmottier/subscriptions\",\n" +
233 | " \"organizations_url\": \"https://api.github.com/users/cyrilmottier/orgs\",\n" +
234 | " \"repos_url\": \"https://api.github.com/users/cyrilmottier/repos\",\n" +
235 | " \"events_url\": \"https://api.github.com/users/cyrilmottier/events{/privacy}\",\n" +
236 | " \"received_events_url\": \"https://api.github.com/users/cyrilmottier/received_events\",\n" +
237 | " \"type\": \"User\",\n" +
238 | " \"site_admin\": false,\n" +
239 | " \"score\": 1.0\n" +
240 | " },\n" +
241 | " {\n" +
242 | " \"login\": \"jgilfelt\",\n" +
243 | " \"id\": 175697,\n" +
244 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/175697?v=3\",\n" +
245 | " \"gravatar_id\": \"\",\n" +
246 | " \"url\": \"https://api.github.com/users/jgilfelt\",\n" +
247 | " \"html_url\": \"https://github.com/jgilfelt\",\n" +
248 | " \"followers_url\": \"https://api.github.com/users/jgilfelt/followers\",\n" +
249 | " \"following_url\": \"https://api.github.com/users/jgilfelt/following{/other_user}\",\n" +
250 | " \"gists_url\": \"https://api.github.com/users/jgilfelt/gists{/gist_id}\",\n" +
251 | " \"starred_url\": \"https://api.github.com/users/jgilfelt/starred{/owner}{/repo}\",\n" +
252 | " \"subscriptions_url\": \"https://api.github.com/users/jgilfelt/subscriptions\",\n" +
253 | " \"organizations_url\": \"https://api.github.com/users/jgilfelt/orgs\",\n" +
254 | " \"repos_url\": \"https://api.github.com/users/jgilfelt/repos\",\n" +
255 | " \"events_url\": \"https://api.github.com/users/jgilfelt/events{/privacy}\",\n" +
256 | " \"received_events_url\": \"https://api.github.com/users/jgilfelt/received_events\",\n" +
257 | " \"type\": \"User\",\n" +
258 | " \"site_admin\": false,\n" +
259 | " \"score\": 1.0\n" +
260 | " },\n" +
261 | " {\n" +
262 | " \"login\": \"greenrobot\",\n" +
263 | " \"id\": 242242,\n" +
264 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/242242?v=3\",\n" +
265 | " \"gravatar_id\": \"\",\n" +
266 | " \"url\": \"https://api.github.com/users/greenrobot\",\n" +
267 | " \"html_url\": \"https://github.com/greenrobot\",\n" +
268 | " \"followers_url\": \"https://api.github.com/users/greenrobot/followers\",\n" +
269 | " \"following_url\": \"https://api.github.com/users/greenrobot/following{/other_user}\",\n" +
270 | " \"gists_url\": \"https://api.github.com/users/greenrobot/gists{/gist_id}\",\n" +
271 | " \"starred_url\": \"https://api.github.com/users/greenrobot/starred{/owner}{/repo}\",\n" +
272 | " \"subscriptions_url\": \"https://api.github.com/users/greenrobot/subscriptions\",\n" +
273 | " \"organizations_url\": \"https://api.github.com/users/greenrobot/orgs\",\n" +
274 | " \"repos_url\": \"https://api.github.com/users/greenrobot/repos\",\n" +
275 | " \"events_url\": \"https://api.github.com/users/greenrobot/events{/privacy}\",\n" +
276 | " \"received_events_url\": \"https://api.github.com/users/greenrobot/received_events\",\n" +
277 | " \"type\": \"User\",\n" +
278 | " \"site_admin\": false,\n" +
279 | " \"score\": 1.0\n" +
280 | " },\n" +
281 | " {\n" +
282 | " \"login\": \"drakeet\",\n" +
283 | " \"id\": 5214214,\n" +
284 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/5214214?v=3\",\n" +
285 | " \"gravatar_id\": \"\",\n" +
286 | " \"url\": \"https://api.github.com/users/drakeet\",\n" +
287 | " \"html_url\": \"https://github.com/drakeet\",\n" +
288 | " \"followers_url\": \"https://api.github.com/users/drakeet/followers\",\n" +
289 | " \"following_url\": \"https://api.github.com/users/drakeet/following{/other_user}\",\n" +
290 | " \"gists_url\": \"https://api.github.com/users/drakeet/gists{/gist_id}\",\n" +
291 | " \"starred_url\": \"https://api.github.com/users/drakeet/starred{/owner}{/repo}\",\n" +
292 | " \"subscriptions_url\": \"https://api.github.com/users/drakeet/subscriptions\",\n" +
293 | " \"organizations_url\": \"https://api.github.com/users/drakeet/orgs\",\n" +
294 | " \"repos_url\": \"https://api.github.com/users/drakeet/repos\",\n" +
295 | " \"events_url\": \"https://api.github.com/users/drakeet/events{/privacy}\",\n" +
296 | " \"received_events_url\": \"https://api.github.com/users/drakeet/received_events\",\n" +
297 | " \"type\": \"User\",\n" +
298 | " \"site_admin\": false,\n" +
299 | " \"score\": 1.0\n" +
300 | " },\n" +
301 | " {\n" +
302 | " \"login\": \"unclebob\",\n" +
303 | " \"id\": 36901,\n" +
304 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/36901?v=3\",\n" +
305 | " \"gravatar_id\": \"\",\n" +
306 | " \"url\": \"https://api.github.com/users/unclebob\",\n" +
307 | " \"html_url\": \"https://github.com/unclebob\",\n" +
308 | " \"followers_url\": \"https://api.github.com/users/unclebob/followers\",\n" +
309 | " \"following_url\": \"https://api.github.com/users/unclebob/following{/other_user}\",\n" +
310 | " \"gists_url\": \"https://api.github.com/users/unclebob/gists{/gist_id}\",\n" +
311 | " \"starred_url\": \"https://api.github.com/users/unclebob/starred{/owner}{/repo}\",\n" +
312 | " \"subscriptions_url\": \"https://api.github.com/users/unclebob/subscriptions\",\n" +
313 | " \"organizations_url\": \"https://api.github.com/users/unclebob/orgs\",\n" +
314 | " \"repos_url\": \"https://api.github.com/users/unclebob/repos\",\n" +
315 | " \"events_url\": \"https://api.github.com/users/unclebob/events{/privacy}\",\n" +
316 | " \"received_events_url\": \"https://api.github.com/users/unclebob/received_events\",\n" +
317 | " \"type\": \"User\",\n" +
318 | " \"site_admin\": false,\n" +
319 | " \"score\": 1.0\n" +
320 | " },\n" +
321 | " {\n" +
322 | " \"login\": \"rengwuxian\",\n" +
323 | " \"id\": 4454687,\n" +
324 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/4454687?v=3\",\n" +
325 | " \"gravatar_id\": \"\",\n" +
326 | " \"url\": \"https://api.github.com/users/rengwuxian\",\n" +
327 | " \"html_url\": \"https://github.com/rengwuxian\",\n" +
328 | " \"followers_url\": \"https://api.github.com/users/rengwuxian/followers\",\n" +
329 | " \"following_url\": \"https://api.github.com/users/rengwuxian/following{/other_user}\",\n" +
330 | " \"gists_url\": \"https://api.github.com/users/rengwuxian/gists{/gist_id}\",\n" +
331 | " \"starred_url\": \"https://api.github.com/users/rengwuxian/starred{/owner}{/repo}\",\n" +
332 | " \"subscriptions_url\": \"https://api.github.com/users/rengwuxian/subscriptions\",\n" +
333 | " \"organizations_url\": \"https://api.github.com/users/rengwuxian/orgs\",\n" +
334 | " \"repos_url\": \"https://api.github.com/users/rengwuxian/repos\",\n" +
335 | " \"events_url\": \"https://api.github.com/users/rengwuxian/events{/privacy}\",\n" +
336 | " \"received_events_url\": \"https://api.github.com/users/rengwuxian/received_events\",\n" +
337 | " \"type\": \"User\",\n" +
338 | " \"site_admin\": false,\n" +
339 | " \"score\": 1.0\n" +
340 | " },\n" +
341 | " {\n" +
342 | " \"login\": \"rovo89\",\n" +
343 | " \"id\": 1573299,\n" +
344 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/1573299?v=3\",\n" +
345 | " \"gravatar_id\": \"\",\n" +
346 | " \"url\": \"https://api.github.com/users/rovo89\",\n" +
347 | " \"html_url\": \"https://github.com/rovo89\",\n" +
348 | " \"followers_url\": \"https://api.github.com/users/rovo89/followers\",\n" +
349 | " \"following_url\": \"https://api.github.com/users/rovo89/following{/other_user}\",\n" +
350 | " \"gists_url\": \"https://api.github.com/users/rovo89/gists{/gist_id}\",\n" +
351 | " \"starred_url\": \"https://api.github.com/users/rovo89/starred{/owner}{/repo}\",\n" +
352 | " \"subscriptions_url\": \"https://api.github.com/users/rovo89/subscriptions\",\n" +
353 | " \"organizations_url\": \"https://api.github.com/users/rovo89/orgs\",\n" +
354 | " \"repos_url\": \"https://api.github.com/users/rovo89/repos\",\n" +
355 | " \"events_url\": \"https://api.github.com/users/rovo89/events{/privacy}\",\n" +
356 | " \"received_events_url\": \"https://api.github.com/users/rovo89/received_events\",\n" +
357 | " \"type\": \"User\",\n" +
358 | " \"site_admin\": false,\n" +
359 | " \"score\": 1.0\n" +
360 | " },\n" +
361 | " {\n" +
362 | " \"login\": \"jfeinstein10\",\n" +
363 | " \"id\": 1269143,\n" +
364 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/1269143?v=3\",\n" +
365 | " \"gravatar_id\": \"\",\n" +
366 | " \"url\": \"https://api.github.com/users/jfeinstein10\",\n" +
367 | " \"html_url\": \"https://github.com/jfeinstein10\",\n" +
368 | " \"followers_url\": \"https://api.github.com/users/jfeinstein10/followers\",\n" +
369 | " \"following_url\": \"https://api.github.com/users/jfeinstein10/following{/other_user}\",\n" +
370 | " \"gists_url\": \"https://api.github.com/users/jfeinstein10/gists{/gist_id}\",\n" +
371 | " \"starred_url\": \"https://api.github.com/users/jfeinstein10/starred{/owner}{/repo}\",\n" +
372 | " \"subscriptions_url\": \"https://api.github.com/users/jfeinstein10/subscriptions\",\n" +
373 | " \"organizations_url\": \"https://api.github.com/users/jfeinstein10/orgs\",\n" +
374 | " \"repos_url\": \"https://api.github.com/users/jfeinstein10/repos\",\n" +
375 | " \"events_url\": \"https://api.github.com/users/jfeinstein10/events{/privacy}\",\n" +
376 | " \"received_events_url\": \"https://api.github.com/users/jfeinstein10/received_events\",\n" +
377 | " \"type\": \"User\",\n" +
378 | " \"site_admin\": false,\n" +
379 | " \"score\": 1.0\n" +
380 | " },\n" +
381 | " {\n" +
382 | " \"login\": \"SimonVT\",\n" +
383 | " \"id\": 549365,\n" +
384 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/549365?v=3\",\n" +
385 | " \"gravatar_id\": \"\",\n" +
386 | " \"url\": \"https://api.github.com/users/SimonVT\",\n" +
387 | " \"html_url\": \"https://github.com/SimonVT\",\n" +
388 | " \"followers_url\": \"https://api.github.com/users/SimonVT/followers\",\n" +
389 | " \"following_url\": \"https://api.github.com/users/SimonVT/following{/other_user}\",\n" +
390 | " \"gists_url\": \"https://api.github.com/users/SimonVT/gists{/gist_id}\",\n" +
391 | " \"starred_url\": \"https://api.github.com/users/SimonVT/starred{/owner}{/repo}\",\n" +
392 | " \"subscriptions_url\": \"https://api.github.com/users/SimonVT/subscriptions\",\n" +
393 | " \"organizations_url\": \"https://api.github.com/users/SimonVT/orgs\",\n" +
394 | " \"repos_url\": \"https://api.github.com/users/SimonVT/repos\",\n" +
395 | " \"events_url\": \"https://api.github.com/users/SimonVT/events{/privacy}\",\n" +
396 | " \"received_events_url\": \"https://api.github.com/users/SimonVT/received_events\",\n" +
397 | " \"type\": \"User\",\n" +
398 | " \"site_admin\": false,\n" +
399 | " \"score\": 1.0\n" +
400 | " },\n" +
401 | " {\n" +
402 | " \"login\": \"shiffman\",\n" +
403 | " \"id\": 191758,\n" +
404 | " \"avatar_url\": \"https://avatars.githubusercontent.com/u/191758?v=3\",\n" +
405 | " \"gravatar_id\": \"\",\n" +
406 | " \"url\": \"https://api.github.com/users/shiffman\",\n" +
407 | " \"html_url\": \"https://github.com/shiffman\",\n" +
408 | " \"followers_url\": \"https://api.github.com/users/shiffman/followers\",\n" +
409 | " \"following_url\": \"https://api.github.com/users/shiffman/following{/other_user}\",\n" +
410 | " \"gists_url\": \"https://api.github.com/users/shiffman/gists{/gist_id}\",\n" +
411 | " \"starred_url\": \"https://api.github.com/users/shiffman/starred{/owner}{/repo}\",\n" +
412 | " \"subscriptions_url\": \"https://api.github.com/users/shiffman/subscriptions\",\n" +
413 | " \"organizations_url\": \"https://api.github.com/users/shiffman/orgs\",\n" +
414 | " \"repos_url\": \"https://api.github.com/users/shiffman/repos\",\n" +
415 | " \"events_url\": \"https://api.github.com/users/shiffman/events{/privacy}\",\n" +
416 | " \"received_events_url\": \"https://api.github.com/users/shiffman/received_events\",\n" +
417 | " \"type\": \"User\",\n" +
418 | " \"site_admin\": false,\n" +
419 | " \"score\": 1.0\n" +
420 | " }\n" +
421 | " ]" +
422 | "}";
423 |
424 | public static String responseJsonPage2 = "{\n" +
425 | "\t\"items\": [{\n" +
426 | "\t\t\"login\": \"nostra13\",\n" +
427 | "\t\t\"id\": 1223348,\n" +
428 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1223348?v=3\",\n" +
429 | "\t\t\"gravatar_id\": \"\",\n" +
430 | "\t\t\"url\": \"https://api.github.com/users/nostra13\",\n" +
431 | "\t\t\"html_url\": \"https://github.com/nostra13\",\n" +
432 | "\t\t\"followers_url\": \"https://api.github.com/users/nostra13/followers\",\n" +
433 | "\t\t\"following_url\": \"https://api.github.com/users/nostra13/following{/other_user}\",\n" +
434 | "\t\t\"gists_url\": \"https://api.github.com/users/nostra13/gists{/gist_id}\",\n" +
435 | "\t\t\"starred_url\": \"https://api.github.com/users/nostra13/starred{/owner}{/repo}\",\n" +
436 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/nostra13/subscriptions\",\n" +
437 | "\t\t\"organizations_url\": \"https://api.github.com/users/nostra13/orgs\",\n" +
438 | "\t\t\"repos_url\": \"https://api.github.com/users/nostra13/repos\",\n" +
439 | "\t\t\"events_url\": \"https://api.github.com/users/nostra13/events{/privacy}\",\n" +
440 | "\t\t\"received_events_url\": \"https://api.github.com/users/nostra13/received_events\",\n" +
441 | "\t\t\"type\": \"User\",\n" +
442 | "\t\t\"site_admin\": false,\n" +
443 | "\t\t\"score\": 1.0\n" +
444 | "\t}, {\n" +
445 | "\t\t\"login\": \"slidenerd\",\n" +
446 | "\t\t\"id\": 5139030,\n" +
447 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/5139030?v=3\",\n" +
448 | "\t\t\"gravatar_id\": \"\",\n" +
449 | "\t\t\"url\": \"https://api.github.com/users/slidenerd\",\n" +
450 | "\t\t\"html_url\": \"https://github.com/slidenerd\",\n" +
451 | "\t\t\"followers_url\": \"https://api.github.com/users/slidenerd/followers\",\n" +
452 | "\t\t\"following_url\": \"https://api.github.com/users/slidenerd/following{/other_user}\",\n" +
453 | "\t\t\"gists_url\": \"https://api.github.com/users/slidenerd/gists{/gist_id}\",\n" +
454 | "\t\t\"starred_url\": \"https://api.github.com/users/slidenerd/starred{/owner}{/repo}\",\n" +
455 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/slidenerd/subscriptions\",\n" +
456 | "\t\t\"organizations_url\": \"https://api.github.com/users/slidenerd/orgs\",\n" +
457 | "\t\t\"repos_url\": \"https://api.github.com/users/slidenerd/repos\",\n" +
458 | "\t\t\"events_url\": \"https://api.github.com/users/slidenerd/events{/privacy}\",\n" +
459 | "\t\t\"received_events_url\": \"https://api.github.com/users/slidenerd/received_events\",\n" +
460 | "\t\t\"type\": \"User\",\n" +
461 | "\t\t\"site_admin\": false,\n" +
462 | "\t\t\"score\": 1.0\n" +
463 | "\t}, {\n" +
464 | "\t\t\"login\": \"kesenhoo\",\n" +
465 | "\t\t\"id\": 1456490,\n" +
466 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1456490?v=3\",\n" +
467 | "\t\t\"gravatar_id\": \"\",\n" +
468 | "\t\t\"url\": \"https://api.github.com/users/kesenhoo\",\n" +
469 | "\t\t\"html_url\": \"https://github.com/kesenhoo\",\n" +
470 | "\t\t\"followers_url\": \"https://api.github.com/users/kesenhoo/followers\",\n" +
471 | "\t\t\"following_url\": \"https://api.github.com/users/kesenhoo/following{/other_user}\",\n" +
472 | "\t\t\"gists_url\": \"https://api.github.com/users/kesenhoo/gists{/gist_id}\",\n" +
473 | "\t\t\"starred_url\": \"https://api.github.com/users/kesenhoo/starred{/owner}{/repo}\",\n" +
474 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/kesenhoo/subscriptions\",\n" +
475 | "\t\t\"organizations_url\": \"https://api.github.com/users/kesenhoo/orgs\",\n" +
476 | "\t\t\"repos_url\": \"https://api.github.com/users/kesenhoo/repos\",\n" +
477 | "\t\t\"events_url\": \"https://api.github.com/users/kesenhoo/events{/privacy}\",\n" +
478 | "\t\t\"received_events_url\": \"https://api.github.com/users/kesenhoo/received_events\",\n" +
479 | "\t\t\"type\": \"User\",\n" +
480 | "\t\t\"site_admin\": false,\n" +
481 | "\t\t\"score\": 1.0\n" +
482 | "\t}, {\n" +
483 | "\t\t\"login\": \"swankjesse\",\n" +
484 | "\t\t\"id\": 133019,\n" +
485 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/133019?v=3\",\n" +
486 | "\t\t\"gravatar_id\": \"\",\n" +
487 | "\t\t\"url\": \"https://api.github.com/users/swankjesse\",\n" +
488 | "\t\t\"html_url\": \"https://github.com/swankjesse\",\n" +
489 | "\t\t\"followers_url\": \"https://api.github.com/users/swankjesse/followers\",\n" +
490 | "\t\t\"following_url\": \"https://api.github.com/users/swankjesse/following{/other_user}\",\n" +
491 | "\t\t\"gists_url\": \"https://api.github.com/users/swankjesse/gists{/gist_id}\",\n" +
492 | "\t\t\"starred_url\": \"https://api.github.com/users/swankjesse/starred{/owner}{/repo}\",\n" +
493 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/swankjesse/subscriptions\",\n" +
494 | "\t\t\"organizations_url\": \"https://api.github.com/users/swankjesse/orgs\",\n" +
495 | "\t\t\"repos_url\": \"https://api.github.com/users/swankjesse/repos\",\n" +
496 | "\t\t\"events_url\": \"https://api.github.com/users/swankjesse/events{/privacy}\",\n" +
497 | "\t\t\"received_events_url\": \"https://api.github.com/users/swankjesse/received_events\",\n" +
498 | "\t\t\"type\": \"User\",\n" +
499 | "\t\t\"site_admin\": false,\n" +
500 | "\t\t\"score\": 1.0\n" +
501 | "\t}, {\n" +
502 | "\t\t\"login\": \"GrahamCampbell\",\n" +
503 | "\t\t\"id\": 2829600,\n" +
504 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/2829600?v=3\",\n" +
505 | "\t\t\"gravatar_id\": \"\",\n" +
506 | "\t\t\"url\": \"https://api.github.com/users/GrahamCampbell\",\n" +
507 | "\t\t\"html_url\": \"https://github.com/GrahamCampbell\",\n" +
508 | "\t\t\"followers_url\": \"https://api.github.com/users/GrahamCampbell/followers\",\n" +
509 | "\t\t\"following_url\": \"https://api.github.com/users/GrahamCampbell/following{/other_user}\",\n" +
510 | "\t\t\"gists_url\": \"https://api.github.com/users/GrahamCampbell/gists{/gist_id}\",\n" +
511 | "\t\t\"starred_url\": \"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}\",\n" +
512 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/GrahamCampbell/subscriptions\",\n" +
513 | "\t\t\"organizations_url\": \"https://api.github.com/users/GrahamCampbell/orgs\",\n" +
514 | "\t\t\"repos_url\": \"https://api.github.com/users/GrahamCampbell/repos\",\n" +
515 | "\t\t\"events_url\": \"https://api.github.com/users/GrahamCampbell/events{/privacy}\",\n" +
516 | "\t\t\"received_events_url\": \"https://api.github.com/users/GrahamCampbell/received_events\",\n" +
517 | "\t\t\"type\": \"User\",\n" +
518 | "\t\t\"site_admin\": false,\n" +
519 | "\t\t\"score\": 1.0\n" +
520 | "\t}, {\n" +
521 | "\t\t\"login\": \"mcxiaoke\",\n" +
522 | "\t\t\"id\": 464330,\n" +
523 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/464330?v=3\",\n" +
524 | "\t\t\"gravatar_id\": \"\",\n" +
525 | "\t\t\"url\": \"https://api.github.com/users/mcxiaoke\",\n" +
526 | "\t\t\"html_url\": \"https://github.com/mcxiaoke\",\n" +
527 | "\t\t\"followers_url\": \"https://api.github.com/users/mcxiaoke/followers\",\n" +
528 | "\t\t\"following_url\": \"https://api.github.com/users/mcxiaoke/following{/other_user}\",\n" +
529 | "\t\t\"gists_url\": \"https://api.github.com/users/mcxiaoke/gists{/gist_id}\",\n" +
530 | "\t\t\"starred_url\": \"https://api.github.com/users/mcxiaoke/starred{/owner}{/repo}\",\n" +
531 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/mcxiaoke/subscriptions\",\n" +
532 | "\t\t\"organizations_url\": \"https://api.github.com/users/mcxiaoke/orgs\",\n" +
533 | "\t\t\"repos_url\": \"https://api.github.com/users/mcxiaoke/repos\",\n" +
534 | "\t\t\"events_url\": \"https://api.github.com/users/mcxiaoke/events{/privacy}\",\n" +
535 | "\t\t\"received_events_url\": \"https://api.github.com/users/mcxiaoke/received_events\",\n" +
536 | "\t\t\"type\": \"User\",\n" +
537 | "\t\t\"site_admin\": false,\n" +
538 | "\t\t\"score\": 1.0\n" +
539 | "\t}, {\n" +
540 | "\t\t\"login\": \"ManuelPeinado\",\n" +
541 | "\t\t\"id\": 2700015,\n" +
542 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/2700015?v=3\",\n" +
543 | "\t\t\"gravatar_id\": \"\",\n" +
544 | "\t\t\"url\": \"https://api.github.com/users/ManuelPeinado\",\n" +
545 | "\t\t\"html_url\": \"https://github.com/ManuelPeinado\",\n" +
546 | "\t\t\"followers_url\": \"https://api.github.com/users/ManuelPeinado/followers\",\n" +
547 | "\t\t\"following_url\": \"https://api.github.com/users/ManuelPeinado/following{/other_user}\",\n" +
548 | "\t\t\"gists_url\": \"https://api.github.com/users/ManuelPeinado/gists{/gist_id}\",\n" +
549 | "\t\t\"starred_url\": \"https://api.github.com/users/ManuelPeinado/starred{/owner}{/repo}\",\n" +
550 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/ManuelPeinado/subscriptions\",\n" +
551 | "\t\t\"organizations_url\": \"https://api.github.com/users/ManuelPeinado/orgs\",\n" +
552 | "\t\t\"repos_url\": \"https://api.github.com/users/ManuelPeinado/repos\",\n" +
553 | "\t\t\"events_url\": \"https://api.github.com/users/ManuelPeinado/events{/privacy}\",\n" +
554 | "\t\t\"received_events_url\": \"https://api.github.com/users/ManuelPeinado/received_events\",\n" +
555 | "\t\t\"type\": \"User\",\n" +
556 | "\t\t\"site_admin\": false,\n" +
557 | "\t\t\"score\": 1.0\n" +
558 | "\t}, {\n" +
559 | "\t\t\"login\": \"android10\",\n" +
560 | "\t\t\"id\": 1360604,\n" +
561 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1360604?v=3\",\n" +
562 | "\t\t\"gravatar_id\": \"\",\n" +
563 | "\t\t\"url\": \"https://api.github.com/users/android10\",\n" +
564 | "\t\t\"html_url\": \"https://github.com/android10\",\n" +
565 | "\t\t\"followers_url\": \"https://api.github.com/users/android10/followers\",\n" +
566 | "\t\t\"following_url\": \"https://api.github.com/users/android10/following{/other_user}\",\n" +
567 | "\t\t\"gists_url\": \"https://api.github.com/users/android10/gists{/gist_id}\",\n" +
568 | "\t\t\"starred_url\": \"https://api.github.com/users/android10/starred{/owner}{/repo}\",\n" +
569 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/android10/subscriptions\",\n" +
570 | "\t\t\"organizations_url\": \"https://api.github.com/users/android10/orgs\",\n" +
571 | "\t\t\"repos_url\": \"https://api.github.com/users/android10/repos\",\n" +
572 | "\t\t\"events_url\": \"https://api.github.com/users/android10/events{/privacy}\",\n" +
573 | "\t\t\"received_events_url\": \"https://api.github.com/users/android10/received_events\",\n" +
574 | "\t\t\"type\": \"User\",\n" +
575 | "\t\t\"site_admin\": false,\n" +
576 | "\t\t\"score\": 1.0\n" +
577 | "\t}, {\n" +
578 | "\t\t\"login\": \"dodola\",\n" +
579 | "\t\t\"id\": 1026848,\n" +
580 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1026848?v=3\",\n" +
581 | "\t\t\"gravatar_id\": \"\",\n" +
582 | "\t\t\"url\": \"https://api.github.com/users/dodola\",\n" +
583 | "\t\t\"html_url\": \"https://github.com/dodola\",\n" +
584 | "\t\t\"followers_url\": \"https://api.github.com/users/dodola/followers\",\n" +
585 | "\t\t\"following_url\": \"https://api.github.com/users/dodola/following{/other_user}\",\n" +
586 | "\t\t\"gists_url\": \"https://api.github.com/users/dodola/gists{/gist_id}\",\n" +
587 | "\t\t\"starred_url\": \"https://api.github.com/users/dodola/starred{/owner}{/repo}\",\n" +
588 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/dodola/subscriptions\",\n" +
589 | "\t\t\"organizations_url\": \"https://api.github.com/users/dodola/orgs\",\n" +
590 | "\t\t\"repos_url\": \"https://api.github.com/users/dodola/repos\",\n" +
591 | "\t\t\"events_url\": \"https://api.github.com/users/dodola/events{/privacy}\",\n" +
592 | "\t\t\"received_events_url\": \"https://api.github.com/users/dodola/received_events\",\n" +
593 | "\t\t\"type\": \"User\",\n" +
594 | "\t\t\"site_admin\": false,\n" +
595 | "\t\t\"score\": 1.0\n" +
596 | "\t}, {\n" +
597 | "\t\t\"login\": \"donnfelker\",\n" +
598 | "\t\t\"id\": 91827,\n" +
599 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/91827?v=3\",\n" +
600 | "\t\t\"gravatar_id\": \"\",\n" +
601 | "\t\t\"url\": \"https://api.github.com/users/donnfelker\",\n" +
602 | "\t\t\"html_url\": \"https://github.com/donnfelker\",\n" +
603 | "\t\t\"followers_url\": \"https://api.github.com/users/donnfelker/followers\",\n" +
604 | "\t\t\"following_url\": \"https://api.github.com/users/donnfelker/following{/other_user}\",\n" +
605 | "\t\t\"gists_url\": \"https://api.github.com/users/donnfelker/gists{/gist_id}\",\n" +
606 | "\t\t\"starred_url\": \"https://api.github.com/users/donnfelker/starred{/owner}{/repo}\",\n" +
607 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/donnfelker/subscriptions\",\n" +
608 | "\t\t\"organizations_url\": \"https://api.github.com/users/donnfelker/orgs\",\n" +
609 | "\t\t\"repos_url\": \"https://api.github.com/users/donnfelker/repos\",\n" +
610 | "\t\t\"events_url\": \"https://api.github.com/users/donnfelker/events{/privacy}\",\n" +
611 | "\t\t\"received_events_url\": \"https://api.github.com/users/donnfelker/received_events\",\n" +
612 | "\t\t\"type\": \"User\",\n" +
613 | "\t\t\"site_admin\": false,\n" +
614 | "\t\t\"score\": 1.0\n" +
615 | "\t}, {\n" +
616 | "\t\t\"login\": \"mikepenz\",\n" +
617 | "\t\t\"id\": 1476232,\n" +
618 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1476232?v=3\",\n" +
619 | "\t\t\"gravatar_id\": \"\",\n" +
620 | "\t\t\"url\": \"https://api.github.com/users/mikepenz\",\n" +
621 | "\t\t\"html_url\": \"https://github.com/mikepenz\",\n" +
622 | "\t\t\"followers_url\": \"https://api.github.com/users/mikepenz/followers\",\n" +
623 | "\t\t\"following_url\": \"https://api.github.com/users/mikepenz/following{/other_user}\",\n" +
624 | "\t\t\"gists_url\": \"https://api.github.com/users/mikepenz/gists{/gist_id}\",\n" +
625 | "\t\t\"starred_url\": \"https://api.github.com/users/mikepenz/starred{/owner}{/repo}\",\n" +
626 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/mikepenz/subscriptions\",\n" +
627 | "\t\t\"organizations_url\": \"https://api.github.com/users/mikepenz/orgs\",\n" +
628 | "\t\t\"repos_url\": \"https://api.github.com/users/mikepenz/repos\",\n" +
629 | "\t\t\"events_url\": \"https://api.github.com/users/mikepenz/events{/privacy}\",\n" +
630 | "\t\t\"received_events_url\": \"https://api.github.com/users/mikepenz/received_events\",\n" +
631 | "\t\t\"type\": \"User\",\n" +
632 | "\t\t\"site_admin\": false,\n" +
633 | "\t\t\"score\": 1.0\n" +
634 | "\t}, {\n" +
635 | "\t\t\"login\": \"gabrielemariotti\",\n" +
636 | "\t\t\"id\": 2583078,\n" +
637 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/2583078?v=3\",\n" +
638 | "\t\t\"gravatar_id\": \"\",\n" +
639 | "\t\t\"url\": \"https://api.github.com/users/gabrielemariotti\",\n" +
640 | "\t\t\"html_url\": \"https://github.com/gabrielemariotti\",\n" +
641 | "\t\t\"followers_url\": \"https://api.github.com/users/gabrielemariotti/followers\",\n" +
642 | "\t\t\"following_url\": \"https://api.github.com/users/gabrielemariotti/following{/other_user}\",\n" +
643 | "\t\t\"gists_url\": \"https://api.github.com/users/gabrielemariotti/gists{/gist_id}\",\n" +
644 | "\t\t\"starred_url\": \"https://api.github.com/users/gabrielemariotti/starred{/owner}{/repo}\",\n" +
645 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/gabrielemariotti/subscriptions\",\n" +
646 | "\t\t\"organizations_url\": \"https://api.github.com/users/gabrielemariotti/orgs\",\n" +
647 | "\t\t\"repos_url\": \"https://api.github.com/users/gabrielemariotti/repos\",\n" +
648 | "\t\t\"events_url\": \"https://api.github.com/users/gabrielemariotti/events{/privacy}\",\n" +
649 | "\t\t\"received_events_url\": \"https://api.github.com/users/gabrielemariotti/received_events\",\n" +
650 | "\t\t\"type\": \"User\",\n" +
651 | "\t\t\"site_admin\": false,\n" +
652 | "\t\t\"score\": 1.0\n" +
653 | "\t}, {\n" +
654 | "\t\t\"login\": \"joshlong\",\n" +
655 | "\t\t\"id\": 54473,\n" +
656 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/54473?v=3\",\n" +
657 | "\t\t\"gravatar_id\": \"\",\n" +
658 | "\t\t\"url\": \"https://api.github.com/users/joshlong\",\n" +
659 | "\t\t\"html_url\": \"https://github.com/joshlong\",\n" +
660 | "\t\t\"followers_url\": \"https://api.github.com/users/joshlong/followers\",\n" +
661 | "\t\t\"following_url\": \"https://api.github.com/users/joshlong/following{/other_user}\",\n" +
662 | "\t\t\"gists_url\": \"https://api.github.com/users/joshlong/gists{/gist_id}\",\n" +
663 | "\t\t\"starred_url\": \"https://api.github.com/users/joshlong/starred{/owner}{/repo}\",\n" +
664 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/joshlong/subscriptions\",\n" +
665 | "\t\t\"organizations_url\": \"https://api.github.com/users/joshlong/orgs\",\n" +
666 | "\t\t\"repos_url\": \"https://api.github.com/users/joshlong/repos\",\n" +
667 | "\t\t\"events_url\": \"https://api.github.com/users/joshlong/events{/privacy}\",\n" +
668 | "\t\t\"received_events_url\": \"https://api.github.com/users/joshlong/received_events\",\n" +
669 | "\t\t\"type\": \"User\",\n" +
670 | "\t\t\"site_admin\": false,\n" +
671 | "\t\t\"score\": 1.0\n" +
672 | "\t}, {\n" +
673 | "\t\t\"login\": \"karan\",\n" +
674 | "\t\t\"id\": 3261985,\n" +
675 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/3261985?v=3\",\n" +
676 | "\t\t\"gravatar_id\": \"\",\n" +
677 | "\t\t\"url\": \"https://api.github.com/users/karan\",\n" +
678 | "\t\t\"html_url\": \"https://github.com/karan\",\n" +
679 | "\t\t\"followers_url\": \"https://api.github.com/users/karan/followers\",\n" +
680 | "\t\t\"following_url\": \"https://api.github.com/users/karan/following{/other_user}\",\n" +
681 | "\t\t\"gists_url\": \"https://api.github.com/users/karan/gists{/gist_id}\",\n" +
682 | "\t\t\"starred_url\": \"https://api.github.com/users/karan/starred{/owner}{/repo}\",\n" +
683 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/karan/subscriptions\",\n" +
684 | "\t\t\"organizations_url\": \"https://api.github.com/users/karan/orgs\",\n" +
685 | "\t\t\"repos_url\": \"https://api.github.com/users/karan/repos\",\n" +
686 | "\t\t\"events_url\": \"https://api.github.com/users/karan/events{/privacy}\",\n" +
687 | "\t\t\"received_events_url\": \"https://api.github.com/users/karan/received_events\",\n" +
688 | "\t\t\"type\": \"User\",\n" +
689 | "\t\t\"site_admin\": false,\n" +
690 | "\t\t\"score\": 1.0\n" +
691 | "\t}, {\n" +
692 | "\t\t\"login\": \"afollestad\",\n" +
693 | "\t\t\"id\": 1820165,\n" +
694 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1820165?v=3\",\n" +
695 | "\t\t\"gravatar_id\": \"\",\n" +
696 | "\t\t\"url\": \"https://api.github.com/users/afollestad\",\n" +
697 | "\t\t\"html_url\": \"https://github.com/afollestad\",\n" +
698 | "\t\t\"followers_url\": \"https://api.github.com/users/afollestad/followers\",\n" +
699 | "\t\t\"following_url\": \"https://api.github.com/users/afollestad/following{/other_user}\",\n" +
700 | "\t\t\"gists_url\": \"https://api.github.com/users/afollestad/gists{/gist_id}\",\n" +
701 | "\t\t\"starred_url\": \"https://api.github.com/users/afollestad/starred{/owner}{/repo}\",\n" +
702 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/afollestad/subscriptions\",\n" +
703 | "\t\t\"organizations_url\": \"https://api.github.com/users/afollestad/orgs\",\n" +
704 | "\t\t\"repos_url\": \"https://api.github.com/users/afollestad/repos\",\n" +
705 | "\t\t\"events_url\": \"https://api.github.com/users/afollestad/events{/privacy}\",\n" +
706 | "\t\t\"received_events_url\": \"https://api.github.com/users/afollestad/received_events\",\n" +
707 | "\t\t\"type\": \"User\",\n" +
708 | "\t\t\"site_admin\": false,\n" +
709 | "\t\t\"score\": 1.0\n" +
710 | "\t}, {\n" +
711 | "\t\t\"login\": \"litesuits\",\n" +
712 | "\t\t\"id\": 3939305,\n" +
713 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/3939305?v=3\",\n" +
714 | "\t\t\"gravatar_id\": \"\",\n" +
715 | "\t\t\"url\": \"https://api.github.com/users/litesuits\",\n" +
716 | "\t\t\"html_url\": \"https://github.com/litesuits\",\n" +
717 | "\t\t\"followers_url\": \"https://api.github.com/users/litesuits/followers\",\n" +
718 | "\t\t\"following_url\": \"https://api.github.com/users/litesuits/following{/other_user}\",\n" +
719 | "\t\t\"gists_url\": \"https://api.github.com/users/litesuits/gists{/gist_id}\",\n" +
720 | "\t\t\"starred_url\": \"https://api.github.com/users/litesuits/starred{/owner}{/repo}\",\n" +
721 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/litesuits/subscriptions\",\n" +
722 | "\t\t\"organizations_url\": \"https://api.github.com/users/litesuits/orgs\",\n" +
723 | "\t\t\"repos_url\": \"https://api.github.com/users/litesuits/repos\",\n" +
724 | "\t\t\"events_url\": \"https://api.github.com/users/litesuits/events{/privacy}\",\n" +
725 | "\t\t\"received_events_url\": \"https://api.github.com/users/litesuits/received_events\",\n" +
726 | "\t\t\"type\": \"User\",\n" +
727 | "\t\t\"site_admin\": false,\n" +
728 | "\t\t\"score\": 1.0\n" +
729 | "\t}, {\n" +
730 | "\t\t\"login\": \"lucasr\",\n" +
731 | "\t\t\"id\": 730395,\n" +
732 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/730395?v=3\",\n" +
733 | "\t\t\"gravatar_id\": \"\",\n" +
734 | "\t\t\"url\": \"https://api.github.com/users/lucasr\",\n" +
735 | "\t\t\"html_url\": \"https://github.com/lucasr\",\n" +
736 | "\t\t\"followers_url\": \"https://api.github.com/users/lucasr/followers\",\n" +
737 | "\t\t\"following_url\": \"https://api.github.com/users/lucasr/following{/other_user}\",\n" +
738 | "\t\t\"gists_url\": \"https://api.github.com/users/lucasr/gists{/gist_id}\",\n" +
739 | "\t\t\"starred_url\": \"https://api.github.com/users/lucasr/starred{/owner}{/repo}\",\n" +
740 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/lucasr/subscriptions\",\n" +
741 | "\t\t\"organizations_url\": \"https://api.github.com/users/lucasr/orgs\",\n" +
742 | "\t\t\"repos_url\": \"https://api.github.com/users/lucasr/repos\",\n" +
743 | "\t\t\"events_url\": \"https://api.github.com/users/lucasr/events{/privacy}\",\n" +
744 | "\t\t\"received_events_url\": \"https://api.github.com/users/lucasr/received_events\",\n" +
745 | "\t\t\"type\": \"User\",\n" +
746 | "\t\t\"site_admin\": false,\n" +
747 | "\t\t\"score\": 1.0\n" +
748 | "\t}, {\n" +
749 | "\t\t\"login\": \"emilsjolander\",\n" +
750 | "\t\t\"id\": 1525924,\n" +
751 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/1525924?v=3\",\n" +
752 | "\t\t\"gravatar_id\": \"\",\n" +
753 | "\t\t\"url\": \"https://api.github.com/users/emilsjolander\",\n" +
754 | "\t\t\"html_url\": \"https://github.com/emilsjolander\",\n" +
755 | "\t\t\"followers_url\": \"https://api.github.com/users/emilsjolander/followers\",\n" +
756 | "\t\t\"following_url\": \"https://api.github.com/users/emilsjolander/following{/other_user}\",\n" +
757 | "\t\t\"gists_url\": \"https://api.github.com/users/emilsjolander/gists{/gist_id}\",\n" +
758 | "\t\t\"starred_url\": \"https://api.github.com/users/emilsjolander/starred{/owner}{/repo}\",\n" +
759 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/emilsjolander/subscriptions\",\n" +
760 | "\t\t\"organizations_url\": \"https://api.github.com/users/emilsjolander/orgs\",\n" +
761 | "\t\t\"repos_url\": \"https://api.github.com/users/emilsjolander/repos\",\n" +
762 | "\t\t\"events_url\": \"https://api.github.com/users/emilsjolander/events{/privacy}\",\n" +
763 | "\t\t\"received_events_url\": \"https://api.github.com/users/emilsjolander/received_events\",\n" +
764 | "\t\t\"type\": \"User\",\n" +
765 | "\t\t\"site_admin\": false,\n" +
766 | "\t\t\"score\": 1.0\n" +
767 | "\t}, {\n" +
768 | "\t\t\"login\": \"antoniolg\",\n" +
769 | "\t\t\"id\": 2178243,\n" +
770 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/2178243?v=3\",\n" +
771 | "\t\t\"gravatar_id\": \"\",\n" +
772 | "\t\t\"url\": \"https://api.github.com/users/antoniolg\",\n" +
773 | "\t\t\"html_url\": \"https://github.com/antoniolg\",\n" +
774 | "\t\t\"followers_url\": \"https://api.github.com/users/antoniolg/followers\",\n" +
775 | "\t\t\"following_url\": \"https://api.github.com/users/antoniolg/following{/other_user}\",\n" +
776 | "\t\t\"gists_url\": \"https://api.github.com/users/antoniolg/gists{/gist_id}\",\n" +
777 | "\t\t\"starred_url\": \"https://api.github.com/users/antoniolg/starred{/owner}{/repo}\",\n" +
778 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/antoniolg/subscriptions\",\n" +
779 | "\t\t\"organizations_url\": \"https://api.github.com/users/antoniolg/orgs\",\n" +
780 | "\t\t\"repos_url\": \"https://api.github.com/users/antoniolg/repos\",\n" +
781 | "\t\t\"events_url\": \"https://api.github.com/users/antoniolg/events{/privacy}\",\n" +
782 | "\t\t\"received_events_url\": \"https://api.github.com/users/antoniolg/received_events\",\n" +
783 | "\t\t\"type\": \"User\",\n" +
784 | "\t\t\"site_admin\": false,\n" +
785 | "\t\t\"score\": 1.0\n" +
786 | "\t}, {\n" +
787 | "\t\t\"login\": \"sephiroth74\",\n" +
788 | "\t\t\"id\": 823858,\n" +
789 | "\t\t\"avatar_url\": \"https://avatars.githubusercontent.com/u/823858?v=3\",\n" +
790 | "\t\t\"gravatar_id\": \"\",\n" +
791 | "\t\t\"url\": \"https://api.github.com/users/sephiroth74\",\n" +
792 | "\t\t\"html_url\": \"https://github.com/sephiroth74\",\n" +
793 | "\t\t\"followers_url\": \"https://api.github.com/users/sephiroth74/followers\",\n" +
794 | "\t\t\"following_url\": \"https://api.github.com/users/sephiroth74/following{/other_user}\",\n" +
795 | "\t\t\"gists_url\": \"https://api.github.com/users/sephiroth74/gists{/gist_id}\",\n" +
796 | "\t\t\"starred_url\": \"https://api.github.com/users/sephiroth74/starred{/owner}{/repo}\",\n" +
797 | "\t\t\"subscriptions_url\": \"https://api.github.com/users/sephiroth74/subscriptions\",\n" +
798 | "\t\t\"organizations_url\": \"https://api.github.com/users/sephiroth74/orgs\",\n" +
799 | "\t\t\"repos_url\": \"https://api.github.com/users/sephiroth74/repos\",\n" +
800 | "\t\t\"events_url\": \"https://api.github.com/users/sephiroth74/events{/privacy}\",\n" +
801 | "\t\t\"received_events_url\": \"https://api.github.com/users/sephiroth74/received_events\",\n" +
802 | "\t\t\"type\": \"User\",\n" +
803 | "\t\t\"site_admin\": false,\n" +
804 | "\t\t\"score\": 1.0\n" +
805 | "\t}]\n" +
806 | "}";
807 | }
808 |
--------------------------------------------------------------------------------