用LoadRecyclerView可以实现youtube的底部加载
- Gradle
compile 'com.flobberworm:LoadRecyclerView:latest.integration'
- Maven
<dependency>
<groupId>com.flobberworm</groupId>
<artifactId>LoadRecyclerView</artifactId>
<version>0.2.0</version>
<type>pom</type>
</dependency>
- Sample Code
RecyclerManager recyclerManager = new RecyclerManager(recyclerView);
recyclerManager.setLoadStatusAdapter(adapter);//adapter is Custom Adapter
recyclerManager.setOnItemClickListener(new ItemClickSupport.OnItemClickListener() {
@Override
public void onItemClicked(RecyclerView recyclerView, int position, View v) {
}
});
recyclerManager.setOnLoadMoreListener(new OnLoadMoreListener() {
@Override
public void onLoadMore() {
}
});