Added more styles, changed some details.

This commit is contained in:
Robert Kolner committed 2011-10-31 18:33:24 +01:00
1 parent de5d722ee4
commit 337f2defa8
5 files changed
+101 -23

No files matched your search

+18
View File
@@ -5,6 +5,8 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import android.net.Uri;
public class Event implements Serializable {
private static final long serialVersionUID = 1L;
public static final String ALL = "Alle";
@@ -44,4 +46,20 @@ public class Event implements Serializable {
public String toString() {
return this.title;
}
public Uri getUri() {
if (this.id <= 0)
return null;
return Uri.parse("http://studentersamfundet.no/vis.php?ID=" + this.id);
}
public Uri getImageUri() {
if (this.id <= 0) {
return null;
}
String imageUri = "http://studentersamfundet.no/imageResize.php?pic=bilder/program/{id}.jpg&maxwidth=480";
return Uri.parse(imageUri.replaceAll("{id}", Integer.toString(this.id)));
}
}