├── .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 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 list); 12 | 13 | void refresh(List 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 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 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_controler.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 |