aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorMartin/Geno <geno+dev@fireorbit.de>2018-11-08 18:48:23 +0100
committerMartin/Geno <geno+dev@fireorbit.de>2018-11-08 18:48:23 +0100
commit2919429c99ca0795988bec9c66a81f246192b17a (patch)
tree86f3dd1ea25fdcf2ce8a408f0c327cfde1ff66e2 /src/main/java/de/pixart/messenger/ui
parent89de4a6fcb79204e670d894e68b1771440efd336 (diff)
use material colors
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
index ce2ce2258..dd24c440d 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -211,6 +211,14 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
}
+ private int getWarningTextColor(boolean onDark) {
+ if (onDark) {
+ return ContextCompat.getColor(activity, R.color.white70);
+ } else {
+ return ContextCompat.getColor(activity, R.color.black26);
+ }
+ }
+
private void displayStatus(ViewHolder viewHolder, final Message message, int type, boolean darkBackground) {
String filesize = null;
String info = null;
@@ -965,7 +973,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
} else {
viewHolder.message_box.setBackgroundResource(darkBackground ? R.drawable.message_bubble_received_warning_dark: R.drawable.message_bubble_received_warning);
viewHolder.encryption.setVisibility(View.VISIBLE);
- viewHolder.encryption.setTextColor(activity.getWarningTextColor());
+ viewHolder.encryption.setTextColor(this.getWarningTextColor(darkBackground));
if (omemoEncryption && !message.isTrusted()) {
viewHolder.encryption.setText(R.string.not_trusted);
} else {