ashLikun/XRecycleView


下拉刷新,自动加载更多的RecycleView

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.ashLikun:XRecycleView:3.0.5'
	}
	dependencies {
		implementation("com.github.ashLikun:XRecycleView:3.0.5")
	}
	<dependency>
	    <groupId>com.github.ashLikun</groupId>
	    <artifactId>XRecycleView</artifactId>
	    <version>3.0.5</version>
	</dependency>

                            
    libraryDependencies += "com.github.ashLikun" % "XRecycleView" % "3.0.5"
        
        

                            
    :dependencies [[com.github.ashLikun/XRecycleView "3.0.5"]]
        
        

Readme


Release

XRecycleView

1:listview,gridview,recycleview 封装自动加载,下拉刷新 2:recycleview分割线,头部与底部 3:分页助手

使用方法

build.gradle文件中添加:

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
    }
}

并且:

dependencies {
    implementation 'com.github.ashLikun:XrecycleView:{latest version}'//XRecycleView
}

1.用法

         /**
             * 下拉刷新是否用自定义的,
             * true:使用自定义的base_swipe_custom_recycle.xml
             * false:使用自定义的base_swipe_recycle.xml    google自己的
             */
        public static boolean REFRESH_IS_CUSTOM = false;

        listSwipeView = (SuperRecyclerView) findViewById(R.id.switchRoot);
        adapter = getAdapter();
        listSwipeView.getRecyclerView().addItemDecoration(getItemDecoration());
        listSwipeView.getRecyclerView().setLayoutManager(getLayoutManager());
        listSwipeView.setAdapter(adapter);
        listSwipeView.setOnRefreshListener(this);
        listSwipeView.setOnLoaddingListener(this);
        adapter.setOnItemClickListener(this);

混肴

保证CommonAdapter的footerSize和headerSize字段不被混肴
#某一变量不混淆
-keepclasseswithmembers class com.xxx.xxx {
    private com.ashlikun.adapter.recyclerview.BaseAdapter footerSize;
    private com.ashlikun.adapter.recyclerview.BaseAdapter  headerSize;
}