/[projects]/android/Side9/src/dk/thoerup/side9/ImageEntry.java
ViewVC logotype

Contents of /android/Side9/src/dk/thoerup/side9/ImageEntry.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1226 - (show annotations) (download)
Wed Feb 9 17:57:08 2011 UTC (13 years, 3 months ago) by torben
File size: 884 byte(s)
Make ImageEntry serializable again
1 package dk.thoerup.side9;
2
3
4 import java.io.Serializable;
5 import java.util.Comparator;
6
7 import android.graphics.Bitmap;
8
9 //Needs to be serializable do send it between PictureOverview and PictureView activities
10 //btw. Bitmap objects are not serializable
11 public class ImageEntry implements Serializable {
12 private static final long serialVersionUID = 1L;
13
14 public String path;
15 transient public Bitmap thumb; //do not serialize
16 public String caption;
17
18
19 public static class PathComparator implements Comparator<ImageEntry> {
20 @Override
21 public int compare(ImageEntry object1, ImageEntry object2) {
22 return object1.path.compareTo(object2.path) * -1;
23 }
24 }
25
26 public static class CaptionComparator implements Comparator<ImageEntry> {
27 @Override
28 public int compare(ImageEntry object1, ImageEntry object2) {
29 return object1.caption.compareTo( object2.caption );
30 }
31
32 }
33
34 }

  ViewVC Help
Powered by ViewVC 1.1.20