I am experiencing a strange issue with ArrayList on Android
If I do this
for(int kk=0;kk<mReadRowIds.size();kk++)
{
if(mRealRowId==mReadRowIds.get(kk))
{
if(kk<mRowNumTimes.size())
{
mArrayNumberPortions.add(mRowNumTimes.get(kk));
bFoundIt=true;
break;
}
else
{
break;
}
}
}
The item is not found, but if I do this
int readrowidforcmp;
for(int kk=0;kk<mReadRowIds.size();kk++)
{
readrowidforcmp = mReadRowIds.get(kk);
if(mRealRowId==readrowidforcmp)
{
if(kk<mRowNumTimes.size())
{
mArrayNumberPortions.add(mRowNumTimes.get(kk));
bFoundIt=true;
break;
}
else
{
break;
}
}
}
The item is found , can someone explain what the difference between these is to me as I have not got a clue. NOTE: Array has to be over 200 items for it to go wrong.