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/utils/UIHelper.java | |
parent | 7382e3af9769f76fe4e19934a59e45a3f9858332 (diff) |
Status color added to "create conversation" (refers to ticket #22 in flyspray)
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java b/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java index bda3f770..3edaad0d 100644 --- a/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java +++ b/src/main/java/de/thedevstack/conversationsplus/utils/UIHelper.java @@ -15,6 +15,7 @@ import de.thedevstack.conversationsplus.entities.Contact; import de.thedevstack.conversationsplus.entities.Conversation; import de.thedevstack.conversationsplus.entities.Downloadable; import de.thedevstack.conversationsplus.entities.Message; +import de.thedevstack.conversationsplus.entities.Presences; import de.thedevstack.conversationsplus.xmpp.jid.Jid; import android.content.Context; @@ -354,6 +355,20 @@ public class UIHelper { } } + public static String getStatusColor(int status) { + switch (status) { + case Presences.ONLINE: + case Presences.CHAT: + return "#259B23"; + case Presences.AWAY: + case Presences.XA: + return "#FF9800"; + case Presences.DND: + return "#E51C23"; + } + return "#CCCCCC"; + } + private static String getDisplayedMucCounterpart(final Jid counterpart) { if (counterpart==null) { return ""; |