aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/values/colors.xml4
-rw-r--r--src/eu/siacs/conversations/ui/ContactDetailsActivity.java14
-rw-r--r--src/eu/siacs/conversations/ui/XmppActivity.java10
-rw-r--r--src/eu/siacs/conversations/ui/adapter/MessageAdapter.java6
4 files changed, 20 insertions, 14 deletions
diff --git a/res/values/colors.xml b/res/values/colors.xml
index ed0a0ffb..fdaff5da 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -9,5 +9,7 @@
<color name="secondarybackground" type="color">#ffeeeeee</color>
<color name="darkbackground" type="color">#ff323232</color>
<color name="divider">#1f000000</color>
- <color name="warningtext">#ffe51c23</color>
+ <color name="red">#ffe51c23</color>
+ <color name="orange">#ffff9800</color>
+ <color name="green">#ff259b24</color>
</resources> \ No newline at end of file
diff --git a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
index 8de2ce80..9d384c60 100644
--- a/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
+++ b/src/eu/siacs/conversations/ui/ContactDetailsActivity.java
@@ -278,31 +278,31 @@ public class ContactDetailsActivity extends XmppActivity {
switch (contact.getMostAvailableStatus()) {
case Presences.CHAT:
status.setText(R.string.contact_status_free_to_chat);
- status.setTextColor(0xFF83b600);
+ status.setTextColor(mColorGreen);
break;
case Presences.ONLINE:
status.setText(R.string.contact_status_online);
- status.setTextColor(0xFF83b600);
+ status.setTextColor(mColorGreen);
break;
case Presences.AWAY:
status.setText(R.string.contact_status_away);
- status.setTextColor(0xFFffa713);
+ status.setTextColor(mColorOrange);
break;
case Presences.XA:
status.setText(R.string.contact_status_extended_away);
- status.setTextColor(0xFFffa713);
+ status.setTextColor(mColorOrange);
break;
case Presences.DND:
status.setText(R.string.contact_status_do_not_disturb);
- status.setTextColor(0xFFe92727);
+ status.setTextColor(mColorRed);
break;
case Presences.OFFLINE:
status.setText(R.string.contact_status_offline);
- status.setTextColor(0xFFe92727);
+ status.setTextColor(mSecondaryTextColor);
break;
default:
status.setText(R.string.contact_status_offline);
- status.setTextColor(0xFFe92727);
+ status.setTextColor(mSecondaryTextColor);
break;
}
if (contact.getPresences().size() > 1) {
diff --git a/src/eu/siacs/conversations/ui/XmppActivity.java b/src/eu/siacs/conversations/ui/XmppActivity.java
index f13c112a..a3503048 100644
--- a/src/eu/siacs/conversations/ui/XmppActivity.java
+++ b/src/eu/siacs/conversations/ui/XmppActivity.java
@@ -55,7 +55,9 @@ public abstract class XmppActivity extends Activity {
protected int mPrimaryTextColor;
protected int mSecondaryTextColor;
- protected int mWarningTextColor;
+ protected int mColorRed;
+ protected int mColorOrange;
+ protected int mColorGreen;
protected int mPrimaryColor;
private DisplayMetrics metrics;
@@ -183,7 +185,9 @@ public abstract class XmppActivity extends Activity {
ExceptionHelper.init(getApplicationContext());
mPrimaryTextColor = getResources().getColor(R.color.primarytext);
mSecondaryTextColor = getResources().getColor(R.color.secondarytext);
- mWarningTextColor = getResources().getColor(R.color.warningtext);
+ mColorRed = getResources().getColor(R.color.red);
+ mColorOrange = getResources().getColor(R.color.orange);
+ mColorGreen = getResources().getColor(R.color.green);
mPrimaryColor = getResources().getColor(R.color.primary);
if (getPreferences().getBoolean("use_larger_font", false)) {
setTheme(R.style.ConversationsTheme_LargerText);
@@ -475,7 +479,7 @@ public abstract class XmppActivity extends Activity {
}
public int getWarningTextColor() {
- return this.mWarningTextColor;
+ return this.mColorRed;
}
public int getPrimaryColor() {
diff --git a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 967042d8..db01eabe 100644
--- a/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -145,7 +145,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
break;
}
if (error) {
- viewHolder.time.setTextColor(0xFFe92727);
+ viewHolder.time.setTextColor(activity.getWarningTextColor());
} else {
viewHolder.time.setTextColor(activity.getSecondaryTextColor());
}
@@ -191,7 +191,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(getContext().getString(r));
- viewHolder.messageBody.setTextColor(0xff33B5E5);
+ viewHolder.messageBody.setTextColor(activity.getSecondaryTextColor());
viewHolder.messageBody.setTypeface(null, Typeface.ITALIC);
viewHolder.messageBody.setTextIsSelectable(false);
}
@@ -204,7 +204,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(getContext().getString(
R.string.decryption_failed));
- viewHolder.messageBody.setTextColor(0xFFe92727);
+ viewHolder.messageBody.setTextColor(activity.getWarningTextColor());
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
viewHolder.messageBody.setTextIsSelectable(false);
}