Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash when item removed from recycler view. #1

Open
KaanRF opened this issue Dec 8, 2019 · 0 comments
Open

App crash when item removed from recycler view. #1

KaanRF opened this issue Dec 8, 2019 · 0 comments

Comments

@KaanRF
Copy link

KaanRF commented Dec 8, 2019

App is crashing when item is removed from recyclerview. Because this position not existed anymore and application is brake in isSection

` @OverRide public boolean isSection(int position) {
boolean result = position == 0 ||
getItem( position ).getTransaction().getTimeStamp().getMonth() !=
getItem( position - 1 ).getTransaction().getTimeStamp().getMonth();

    return result;
}

@Override public CharSequence getSectionHeader(int position) {
    DateFormat dateFormat = new SimpleDateFormat( "MM/yyyy" );
    return dateFormat.format( getItem( position ).getTransaction().getTimeStamp() );
}`

Do you have any suggestion how can I avoid that without app crash ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant