diff options
author | steckbrief <steckbrief@chefmail.de> | 2015-05-26 22:28:31 +0200 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2015-06-19 09:47:04 +0200 |
commit | b6584dfd0b3a7347c7788143fda486f18a1518ee (patch) | |
tree | ed68c90ec852a0173b435e9160ccbdf16c779a5d /src/main/java/de/thedevstack/conversationsplus/entities | |
parent | 7382e3af9769f76fe4e19934a59e45a3f9858332 (diff) |
Status color added to "create conversation" (refers to ticket #22 in flyspray)
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/entities')
3 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/Bookmark.java b/src/main/java/de/thedevstack/conversationsplus/entities/Bookmark.java index ea7df2f2..8a6b1405 100644 --- a/src/main/java/de/thedevstack/conversationsplus/entities/Bookmark.java +++ b/src/main/java/de/thedevstack/conversationsplus/entities/Bookmark.java @@ -1,5 +1,7 @@ package de.thedevstack.conversationsplus.entities; +import android.graphics.Color; + import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -74,6 +76,11 @@ public class Bookmark extends Element implements ListItem { return tags; } + @Override + public int getStatusColor() { + return Color.parseColor("#259B23"); + } + public String getNick() { Element nick = this.findChild("nick"); if (nick != null) { diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/Contact.java b/src/main/java/de/thedevstack/conversationsplus/entities/Contact.java index 07d42d28..c4f1c9eb 100644 --- a/src/main/java/de/thedevstack/conversationsplus/entities/Contact.java +++ b/src/main/java/de/thedevstack/conversationsplus/entities/Contact.java @@ -2,6 +2,7 @@ package de.thedevstack.conversationsplus.entities; import android.content.ContentValues; import android.database.Cursor; +import android.graphics.Color; import org.json.JSONArray; import org.json.JSONException; @@ -147,6 +148,11 @@ public class Contact implements ListItem, Blockable { return tags; } + @Override + public int getStatusColor() { + return Color.parseColor(UIHelper.getStatusColor(getMostAvailableStatus())); + } + public boolean match(String needle) { if (needle == null || needle.isEmpty()) { return true; diff --git a/src/main/java/de/thedevstack/conversationsplus/entities/ListItem.java b/src/main/java/de/thedevstack/conversationsplus/entities/ListItem.java index 825eb481..9daf90d1 100644 --- a/src/main/java/de/thedevstack/conversationsplus/entities/ListItem.java +++ b/src/main/java/de/thedevstack/conversationsplus/entities/ListItem.java @@ -11,6 +11,8 @@ public interface ListItem extends Comparable<ListItem> { public List<Tag> getTags(); + public int getStatusColor(); + public final class Tag { private final String name; private final int color; |