aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <kriztan@users.noreply.github.com>2018-11-08 19:20:14 +0100
committerGitHub <noreply@github.com>2018-11-08 19:20:14 +0100
commitdccfc8c5cb926f4f5564a3239accdd7900df4f26 (patch)
treeb55ff8a44ac8e31e997bd2ee1e7896c99ba95a9f /src/main/java/de/pixart/messenger
parentdbec38d3b2aece30f29bdb7e6526ca6bc288777e (diff)
parent2919429c99ca0795988bec9c66a81f246192b17a (diff)
Merge pull request #262 from genofire/mini-redesign
design message border
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java12
2 files changed, 11 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index be4ca8af4..45929344c 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -3091,7 +3091,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
private int messageInputBubble() {
- return activity.isDarkTheme() ? R.drawable.message_bubble_sent_blue_dark : R.drawable.message_bubble_sent_blue;
+ return activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent;
}
public Conversation getConversation() {
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 bc65fd68a..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 {
@@ -975,7 +983,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
if (type == SENT) {
- viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_blue_dark : R.drawable.message_bubble_sent_blue);
+ viewHolder.message_box.setBackgroundResource(activity.isDarkTheme() ? R.drawable.message_bubble_sent_dark : R.drawable.message_bubble_sent);
}
displayStatus(viewHolder, message, type, darkBackground);