From 626d0d3260d792843bebf2a8b8a62c1a026dd314 Mon Sep 17 00:00:00 2001 From: Matthias Rieber Date: Sat, 29 Aug 2015 12:22:52 +0200 Subject: blue theme --- .../java/eu/siacs/conversations/ui/XmppActivity.java | 2 +- .../conversations/ui/adapter/MessageAdapter.java | 20 ++++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) (limited to 'src/main/java/eu') diff --git a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java index e54596b0d..b236c872d 100644 --- a/src/main/java/eu/siacs/conversations/ui/XmppActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/XmppActivity.java @@ -371,7 +371,7 @@ public abstract class XmppActivity extends Activity { mTertiaryTextColor = getResources().getColor(R.color.black12); mColorRed = getResources().getColor(R.color.red800); mColorOrange = getResources().getColor(R.color.orange500); - mColorGreen = getResources().getColor(R.color.green500); + mColorGreen = getResources().getColor(R.color.realgreen); mPrimaryColor = getResources().getColor(R.color.primary); mPrimaryBackgroundColor = getResources().getColor(R.color.grey50); mSecondaryBackgroundColor = getResources().getColor(R.color.grey200); diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 36c6d3acf..d19a5cfec 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -124,9 +124,9 @@ public class MessageAdapter extends ArrayAdapter { private int getMessageTextColor(boolean onDark, boolean primary) { if (onDark) { - return activity.getResources().getColor(primary ? R.color.white : R.color.white70); + return activity.getResources().getColor(primary ? R.color.green900 : R.color.primary); } else { - return activity.getResources().getColor(primary ? R.color.black87 : R.color.black54); + return activity.getResources().getColor(primary ? R.color.green900 : R.color.primary); } } @@ -577,7 +577,7 @@ public class MessageAdapter extends ArrayAdapter { } } - boolean darkBackground = (type == RECEIVED && (!isInValidSession || !mUseWhiteBackground)); + boolean darkBackground = (type == SENT && (!isInValidSession || !mUseWhiteBackground)); if (type == STATUS) { if ("LOAD_MORE".equals(message.getBody())) { @@ -705,11 +705,7 @@ public class MessageAdapter extends ArrayAdapter { if (type == RECEIVED) { if(isInValidSession) { - if (mUseWhiteBackground) { - viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_white); - } else { - viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received); - } + viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received); viewHolder.encryption.setVisibility(View.GONE); } else { viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_warning); @@ -718,6 +714,14 @@ public class MessageAdapter extends ArrayAdapter { } } + if (type == SENT) { + if (mUseWhiteBackground) { + viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_sent_white); + } else { + viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_sent); + } + } + displayStatus(viewHolder, message, type, darkBackground); return view; -- cgit v1.2.3