6 |
import java.io.IOException; |
import java.io.IOException; |
7 |
import java.io.RandomAccessFile; |
import java.io.RandomAccessFile; |
8 |
import java.util.ArrayList; |
import java.util.ArrayList; |
9 |
|
import java.util.Comparator; |
10 |
|
|
11 |
import java.util.Collections; |
import java.util.Collections; |
12 |
|
|
74 |
mImages.add(entry); |
mImages.add(entry); |
75 |
} |
} |
76 |
|
|
77 |
Collections.sort(mImages, new ImageEntry.PathComparator() ); |
Collections.sort(mImages, new ImageEntry.PathComparator() ); |
78 |
|
preloadImages(0,30); |
|
preloadImages(0,18); |
|
79 |
|
|
80 |
thumbSize = getSize(); |
thumbSize = getSize(); |
81 |
} |
} |
128 |
return thumbBmp; |
return thumbBmp; |
129 |
} |
} |
130 |
|
|
131 |
|
private void orderImages(Comparator<ImageEntry> comparator) { |
132 |
|
Collections.sort(mImages, comparator); |
133 |
|
preloadImages(0,30); |
134 |
|
this.notifyDataSetChanged(); |
135 |
|
} |
136 |
|
|
137 |
public void orderByPath() { |
public void orderByPath() { |
138 |
Collections.sort(mImages, new ImageEntry.PathComparator()); |
orderImages( new ImageEntry.PathComparator()); |
|
preloadImages(0,18); |
|
|
this.notifyDataSetChanged(); |
|
139 |
} |
} |
140 |
|
|
141 |
public void orderByCaption() { |
public void orderByCaption() { |
142 |
Collections.sort(mImages, new ImageEntry.CaptionComparator()); |
orderImages(new ImageEntry.CaptionComparator()); |
|
preloadImages(0,18); |
|
|
this.notifyDataSetChanged(); |
|
143 |
} |
} |
144 |
|
|
145 |
@Override |
@Override |