-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from manneohlund/rc-2.2.0
Rc 2.2.0
- Loading branch information
Showing
24 changed files
with
464 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<ProgressBar xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/progressBar" | ||
style="@style/Base.Widget.AppCompat.ProgressBar" | ||
android:layout_width="160dp" | ||
android:layout_height="240dp" | ||
android:layout_gravity="center" | ||
android:padding="60dp" /> |
62 changes: 62 additions & 0 deletions
62
smartadapter/src/main/java/smartadapter/ISmartEndlessScrollRecyclerAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package smartadapter; | ||
|
||
/* | ||
* Created by Manne Öhlund on 2019-07-29. | ||
* Copyright (c) All rights reserved. | ||
*/ | ||
|
||
import android.support.annotation.LayoutRes; | ||
import android.support.annotation.NonNull; | ||
|
||
import smartadapter.listener.OnLoadMoreListener; | ||
|
||
/** | ||
* Defines the extension methods for {@link SmartEndlessScrollRecyclerAdapter}. | ||
*/ | ||
public interface ISmartEndlessScrollRecyclerAdapter { | ||
|
||
/** | ||
* Used to determine if loading view should show or not. | ||
* If {@link #isEndlessScrollEnabled()} returns true this returns 1. | ||
* @return offset loading view count | ||
*/ | ||
int getEndlessScrollOffset(); | ||
|
||
/** | ||
* Checks if endless scrolling is enabled. | ||
* @return endless scrolling enabled | ||
*/ | ||
boolean isEndlessScrollEnabled(); | ||
|
||
/** | ||
* Setter for enabling endless scrolling by letting the {@link SmartEndlessScrollRecyclerAdapter} render a loading view. | ||
* @param enabled if true enables endless scrolling. | ||
*/ | ||
void setEndlessScrollEnabled(boolean enabled); | ||
|
||
/** | ||
* Checks if the {@link SmartEndlessScrollRecyclerAdapter} is in loading state. | ||
* Good to use when async loading takes time and user scrolls back and forth. | ||
* @return loading state | ||
*/ | ||
boolean isLoading(); | ||
|
||
/** | ||
* Setting the loading state to {@link SmartEndlessScrollRecyclerAdapter}. | ||
* @param loading state for loading more items | ||
*/ | ||
void setIsLoading(boolean loading); | ||
|
||
/** | ||
* Setter for {@link OnLoadMoreListener} callback for listening on when the {@link SmartEndlessScrollRecyclerAdapter} | ||
* is showing the {@link smartadapter.viewholder.LoadMoreViewHolder}. | ||
* @param onLoadMoreListener load more callback | ||
*/ | ||
void setOnLoadMoreListener(@NonNull OnLoadMoreListener onLoadMoreListener); | ||
|
||
/** | ||
* Enables customization of the layout for the {@link smartadapter.viewholder.LoadMoreViewHolder}. | ||
* @param loadMoreLayoutResource layout resource | ||
*/ | ||
void setCustomLoadMoreLayoutResource(@LayoutRes int loadMoreLayoutResource); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.