MaterialList icon indicating copy to clipboard operation
MaterialList copied to clipboard

first card in list can never be dismissed.

Open marijandbob opened this issue 10 years ago • 1 comments

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

marijandbob avatar Oct 03 '15 20:10 marijandbob

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;
}

marijandbob avatar Oct 03 '15 20:10 marijandbob