aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-25 22:15:58 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-25 22:29:16 +0200
commitebaa9dcfab701117ff6b0e13979ee46b941c4607 (patch)
treec0005f8f840e4a5c0e2b7c9c8e935d538e86a3d3 /src
parent8fcedc431111bf33d3f23b922793cd721cdc1df9 (diff)
some theme fixes
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java20
-rw-r--r--src/main/res/layout/activity_contact_details.xml1
-rw-r--r--src/main/res/layout/contact_key.xml4
-rw-r--r--src/main/res/layout/message_received.xml5
-rw-r--r--src/main/res/layout/message_sent.xml3
-rw-r--r--src/main/res/values/colors.xml1
6 files changed, 16 insertions, 18 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 707deed2b..1b343aa67 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -319,7 +319,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
if (error && type == SENT) {
viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_Waring);
- viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_Waring);
DownloadableFile file = activity.xmppConnectionService.getFileBackend().getFile(message);
if (file.exists()) {
if (activity.xmppConnectionService.mHttpConnectionManager.getAutoAcceptFileSize() >= message.getFileParams().size) {
@@ -336,14 +335,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.resend_button.setText(R.string.send_again);
viewHolder.resend_button.setCompoundDrawablesWithIntrinsicBounds(R.drawable.ic_resend_grey600_48dp, 0, 0, 0);
viewHolder.resend_button.setOnClickListener(v -> mConversationFragment.resendMessage(message));
- } else if (!error && type == SENT) {
- viewHolder.resend_button.setVisibility(View.GONE);
- if (darkBackground) {
- viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_OnDark);
- } else {
- viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption);
- }
- viewHolder.time.setTextColor(this.getMessageTextColor(darkBackground, false));
} else {
if (darkBackground) {
viewHolder.time.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Caption_OnDark);
@@ -352,6 +343,9 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
viewHolder.time.setTextColor(this.getMessageTextColor(darkBackground, false));
}
+ if (!error && type == SENT) {
+ viewHolder.resend_button.setVisibility(View.GONE);
+ }
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
viewHolder.indicator.setVisibility(View.GONE);
} else {
@@ -544,7 +538,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
} else {
viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1);
}
- viewHolder.messageBody.setHighlightColor(ContextCompat.getColor(activity, darkBackground ? R.color.grey800 : R.color.grey500));
+ viewHolder.messageBody.setHighlightColor(darkBackground ? type == SENT ? ContextCompat.getColor(activity, R.color.black26) : ContextCompat.getColor(activity, R.color.grey800) : ContextCompat.getColor(activity, R.color.grey500));
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
if (message.getBody() != null) {
final String nick = UIHelper.getMessageDisplayName(message);
@@ -878,7 +872,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}
}
- boolean darkBackground = type == SENT && !isInValidSession || activity.isDarkTheme();
+ boolean darkBackground = type == RECEIVED && !isInValidSession || activity.isDarkTheme();
if (type == DATE_SEPARATOR) {
if (UIHelper.today(message.getTimeSent())) {
@@ -1007,9 +1001,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
} else {
viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_warning);
viewHolder.encryption.setVisibility(View.VISIBLE);
- if (!darkBackground) {
- viewHolder.encryption.setTextColor(activity.getWarningTextColor());
- }
+ viewHolder.encryption.setTextColor(activity.getWarningTextColor());
if (omemoEncryption && !message.isTrusted()) {
viewHolder.encryption.setText(R.string.not_trusted);
} else {
diff --git a/src/main/res/layout/activity_contact_details.xml b/src/main/res/layout/activity_contact_details.xml
index 93fdffbe9..7c93e5be2 100644
--- a/src/main/res/layout/activity_contact_details.xml
+++ b/src/main/res/layout/activity_contact_details.xml
@@ -33,6 +33,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
android:orientation="vertical"
android:padding="@dimen/card_padding_regular">
diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml
index 8e908881c..dec322f68 100644
--- a/src/main/res/layout/contact_key.xml
+++ b/src/main/res/layout/contact_key.xml
@@ -47,7 +47,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="?attr/icon_alpha"
- android:background="?attr/color_background_secondary"
+ android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_remove"
android:visibility="gone" />
@@ -57,7 +57,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="?attr/icon_alpha"
- android:background="?attr/color_background_secondary"
+ android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_enable_undecided_device"
android:visibility="gone" />
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 2460367e5..dbc379aaf 100644
--- a/src/main/res/layout/message_received.xml
+++ b/src/main/res/layout/message_received.xml
@@ -65,7 +65,7 @@
android:layout_marginRight="4sp"
android:alpha="0.70"
android:gravity="center_vertical"
- android:src="@drawable/ic_lock_white_18dp" />
+ android:src="@drawable/ic_lock_black_18dp" />
<ImageView
android:id="@+id/edit_indicator"
@@ -73,8 +73,9 @@
android:layout_height="?attr/TextSizeCaption"
android:layout_gravity="center_vertical"
android:layout_marginRight="4sp"
+ android:alpha="0.70"
android:gravity="center_vertical"
- android:src="@drawable/ic_mode_edit_white_18dp" />
+ android:src="@drawable/ic_mode_edit_black_18dp" />
<TextView
android:id="@+id/message_time"
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index b1c44cbdd..df904e98d 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -82,6 +82,7 @@
android:layout_height="?attr/TextSizeCaption"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4sp"
+ android:alpha="0.54"
android:gravity="center_vertical"
android:src="@drawable/ic_mode_edit_black_18dp" />
@@ -91,6 +92,7 @@
android:layout_height="?attr/TextSizeCaption"
android:layout_gravity="center_vertical"
android:layout_marginLeft="4sp"
+ android:alpha="0.54"
android:gravity="center_vertical"
android:src="@drawable/ic_received_indicator" />
@@ -101,6 +103,7 @@
android:layout_gravity="center_vertical"
android:layout_marginLeft="-8sp"
android:adjustViewBounds="false"
+ android:alpha="0.54"
android:gravity="center_vertical"
android:src="@drawable/ic_read_indicator" />
</LinearLayout>
diff --git a/src/main/res/values/colors.xml b/src/main/res/values/colors.xml
index 88b2dafb8..ffb542fc1 100644
--- a/src/main/res/values/colors.xml
+++ b/src/main/res/values/colors.xml
@@ -6,6 +6,7 @@
<color name="accent">#ff0091ea</color>
<color name="black87">#de000309</color>
<color name="black54">#8a000309</color>
+ <color name="black26">#42000000</color>
<color name="black12">#1f000000</color>
<color name="realblack">#ff000000</color>
<color name="white">#ffe2e7f1</color>