SwipeStack
SwipeStack copied to clipboard
does not set "SAVE" and "NEXT" field on textview when swipe the cardstack.
i want set "SAVE" and "NEXT" field on textview when swipe the cardstack. but text set on 3rd position of cardstack, what is an issue?
cardStack.setSwipeProgressListener(new SwipeStack.SwipeProgressListener() { @Override public void onSwipeStart(int position) {
}
@Override
public void onSwipeProgress(int position, float progress) {
if (progress < 0) {
mHolder.textViewSave.setText(getItem(position).getSave());
} else {
mHolder.textViewSave.setText(getItem(position).getNull());
}
if (progress > 0) {
mHolder.textViewNext.setText(getItem(position).getNext());
} else {
mHolder.textViewNext.setText(getItem(position).getNull());
}
}
@Override
public void onSwipeEnd(int position) {
}
});