MaterialList
MaterialList copied to clipboard
first card in list can never be dismissed.
Hi - First, thank you for an awesome library.
I have a problem where the first card (card 0) does not get dismissed. Ever. For any card type.
I tracked it down through your library code and (finally) found it. The problem is in MaterialListAdapter.java, in the getCard() method around line 118 (in the copy i have):
public Card getCard(int position) {
//bug here. first test should be "position > -1"
if(position > 0 && position < mCardList.size()) {
return mCardList.get(position);
}
return null;
}
Thank you!! bob
sorry the code is so badly formatted. trying again:
public Card getCard(int position) {
// bug here. first test should be "position > -1"
// or "position >= 0"
if(position > 0 && position < mCardList.size()) {
return mCardList.get(position);
}
return null;
}