Skip to content

Commit

Permalink
- changed methods
Browse files Browse the repository at this point in the history
  • Loading branch information
TreesAreOP committed Feb 12, 2018
1 parent 0c1feb0 commit 8798829
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ private boolean fitNewItemAndAdjustHeight() {
@Override
public void onItemDismiss(int position) {
removeItem(position);
itemWasDismissed(position);
}

@Override
Expand All @@ -328,6 +329,10 @@ public void onItemMove(int fromPosition, int toPosition) {
DynamicStackSaveManager.swapSavedPosition(fromPosition, toPosition);
notifyItemMoved(fromPosition, toPosition);

itemWasMoved(fromPosition, toPosition);
}

public abstract void itemWasDismissed(int position);
public abstract void itemWasMoved(int fromPosition, int toPosition);

}
10 changes: 10 additions & 0 deletions app/src/main/java/de/taop/hskl/libtest/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,16 @@ public void withBindViewHolder(MyViewHolder myViewHolder, int i, Data data) {

}

@Override
public void itemWasDismissed(int position) {

}

@Override
public void itemWasMoved(int fromPosition, int toPosition) {

}

}

class MyViewHolder extends DynamicStackViewHolder<Data> {
Expand Down

0 comments on commit 8798829

Please sign in to comment.