Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

check should be on the index not on the list of ids #45

Open
GuidoCasati opened this issue Apr 28, 2018 · 1 comment
Open

check should be on the index not on the list of ids #45

GuidoCasati opened this issue Apr 28, 2018 · 1 comment

Comments

@GuidoCasati
Copy link

if(mListIndex < mListImagesIds.size())
imageView.setImageResource(mListImagesIds.get(mListIndex));

@alwarren
Copy link

alwarren commented May 23, 2018

Not sure what you're suggesting but this is a range check after the previous increment. It tests the index against the size of the list. It should be if(mListIndex < mImageIds.size()-1)

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

No branches or pull requests

2 participants