Skip to content

Commit

Permalink
fix #339
Browse files Browse the repository at this point in the history
  • Loading branch information
ChadCym committed Sep 20, 2016
1 parent 96f8a24 commit bfafa14
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public void add(int position, T item) {
* @param data
*/
public void setNewData(List<T> data) {
this.mData = data;
this.mData = data == null ? new ArrayList<T>() : data;
if (mRequestLoadMoreListener != null) {
mNextLoadEnable = true;
// mFooterLayout = null;
Expand All @@ -223,6 +223,7 @@ public void setNewData(List<T> data) {

/**
* add one new data in to certain location
*
* @param position
*/
public void addData(int position, T data) {
Expand All @@ -237,6 +238,7 @@ public void addData(int position, T data) {

/**
* add new data in to certain location
*
* @param position
*/
public void addData(int position, List<T> data) {
Expand Down Expand Up @@ -1103,9 +1105,10 @@ public int expandAll(int position, boolean animate, boolean notify) {

/**
* expand the item and all its subItems
*
* @param position position of the item, which includes the header layout count.
* @param init whether you are initializing the recyclerView or not.
* if <strong>true</strong>, it won't notify recyclerView to redraw UI.
* @param init whether you are initializing the recyclerView or not.
* if <strong>true</strong>, it won't notify recyclerView to redraw UI.
* @return the number of items that have been added to the adapter.
*/
public int expandAll(int position, boolean init) {
Expand Down Expand Up @@ -1141,8 +1144,8 @@ private int recursiveCollapse(@IntRange(from = 0) int position) {
* Collapse an expandable item that has been expanded..
*
* @param position the position of the item, which includes the header layout count.
* @param animate collapse with animation or not.
* @param notify notify the recyclerView refresh UI or not.
* @param animate collapse with animation or not.
* @param notify notify the recyclerView refresh UI or not.
* @return the number of subItems collapsed.
*/
public int collapse(@IntRange(from = 0) int position, boolean animate, boolean notify) {
Expand Down Expand Up @@ -1202,7 +1205,7 @@ private boolean isExpandable(T item) {
private IExpandable getExpandableItem(int position) {
T item = getItem(position);
if (isExpandable(item)) {
return (IExpandable)item;
return (IExpandable) item;
} else {
return null;
}
Expand Down

0 comments on commit bfafa14

Please sign in to comment.