Reputation: 59
I want to iterate through my ArrayList named parts, here is my code:
for(x in parts.indices){
Log.i("INFO", parts.indices.toString())
}
The output is the following:
0..52
0..52
But I'd expect 0..52 to be printed 53 times. I've tried changing x in parts.indices
to x in 0 until parts.size
, but the output remains the same. Interestingly enough, when I use the same construction in another class with the same imports it works ok. What am I doing wrong?
Upvotes: 0
Views: 374
Reputation: 59
It is a Log issue, as noted by @Marko Topolnik, it seems to be 'folding' the output when strings are identical. Println does it as well, but at least prints a message saying 'identical 51 lines'
.
Upvotes: 1