From b6584dfd0b3a7347c7788143fda486f18a1518ee Mon Sep 17 00:00:00 2001 From: steckbrief Date: Tue, 26 May 2015 22:28:31 +0200 Subject: Status color added to "create conversation" (refers to ticket #22 in flyspray) --- .../de/thedevstack/conversationsplus/utils/UIHelper.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/main/java/de/thedevstack/conversationsplus/utils') 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 ""; -- cgit v1.2.3