Reputation: 1672
I have a ListView filled with for loop. The data inside ListView is now in direction
and I want it to be in proper direction:
Upvotes: 2
Views: 1119
Reputation: 144
Use Collections.reverse(arrayList); This will automatically reverse the data.
Upvotes: 0
Reputation: 6981
Collections.sort is probably what you're up for!
http://www.vogella.de/blog/2009/08/04/collections-sort-java/
Upvotes: 1
Reputation: 27455
Just loop in the other direction.
Instead of
for(int i = 1; i < 7; i++){
// fill array with values ...
}
do
for(int i = 6; i > 0; i--){
// fill array with values ...
}
Upvotes: 0