diff options
author | marcinzelent <zelent.marcin@gmail.com> | 2018-04-19 23:03:13 +0200 |
---|---|---|
committer | marcinzelent <zelent.marcin@gmail.com> | 2018-04-19 23:03:13 +0200 |
commit | 4e6fc4fcdbcc3c75be13b3f8b80c24e4648fe354 (patch) | |
tree | 9588d81ee5e3e470d242f82b015fac6e34d54014 /app/src/main/java/org/marcinzelent/liberavem/Bird.java | |
parent | 7294c6bd32e362b4c0a64cadbf4dd2c191e1ad8e (diff) |
Added details view, improved observations list
Diffstat (limited to 'app/src/main/java/org/marcinzelent/liberavem/Bird.java')
-rw-r--r-- | app/src/main/java/org/marcinzelent/liberavem/Bird.java | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/app/src/main/java/org/marcinzelent/liberavem/Bird.java b/app/src/main/java/org/marcinzelent/liberavem/Bird.java index 668059c..a94faf3 100644 --- a/app/src/main/java/org/marcinzelent/liberavem/Bird.java +++ b/app/src/main/java/org/marcinzelent/liberavem/Bird.java @@ -1,37 +1,51 @@ package org.marcinzelent.liberavem; -public class Bird { - private int Id; - private long Created; - private String NameEnglish; - private String NameDanish; - private String PhotoUrl; - - public Bird(int id, long created, String nameEnglish, String nameDanish, String photoUrl) { - Id = id; - Created = created; - NameEnglish = nameEnglish; - NameDanish = nameDanish; - PhotoUrl = photoUrl; +import com.google.gson.annotations.SerializedName; + +import java.io.Serializable; + +public class Bird implements Serializable { + @SerializedName("Id") + private int id; + @SerializedName("Created") + private String created; + @SerializedName("NameEnglish") + private String nameEnglish; + @SerializedName("NameDanish") + private String nameDanish; + @SerializedName("PhotoUrl") + private String photoUrl; + + public Bird(int id, String created, String nameEnglish, String nameDanish, String photoUrl) { + this.id = id; + this.created = created; + this.nameEnglish = nameEnglish; + this.nameDanish = nameDanish; + this.photoUrl = photoUrl; } public int getId() { - return Id; + return id; } - public long getCreated() { - return Created; + public String getCreated() { + return created; } public String getNameEnglish() { - return NameEnglish; + return nameEnglish; } public String getNameDanish() { - return NameDanish; + return nameDanish; } public String getPhotoUrl() { - return PhotoUrl; + return photoUrl; + } + + @Override + public String toString() { + return getNameEnglish(); } } |