aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/de/pixart/messenger/services/AudioPlayer.java6
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java6
-rw-r--r--src/main/java/de/pixart/messenger/ui/OmemoActivity.java12
-rw-r--r--src/main/java/de/pixart/messenger/ui/XmppActivity.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java31
-rw-r--r--src/main/res/layout/activity_edit_account.xml25
-rw-r--r--src/main/res/layout/activity_publish_profile_picture.xml4
-rw-r--r--src/main/res/layout/activity_set_presence.xml15
-rw-r--r--src/main/res/layout/activity_share_locaction.xml29
-rw-r--r--src/main/res/layout/contact_key.xml1
-rw-r--r--src/main/res/layout/dialog_show_password.xml2
-rw-r--r--src/main/res/layout/dialog_verify_fingerprints.xml9
-rw-r--r--src/main/res/layout/fragment_conversation.xml6
-rw-r--r--src/main/res/layout/list_item_tag.xml11
-rw-r--r--src/main/res/layout/message_content.xml119
-rw-r--r--src/main/res/layout/message_date_bubble.xml3
-rw-r--r--src/main/res/layout/message_received.xml22
-rw-r--r--src/main/res/layout/message_sent.xml27
-rw-r--r--src/main/res/layout/message_status.xml24
-rw-r--r--src/main/res/layout/presence_template.xml28
-rw-r--r--src/main/res/values/styles.xml48
21 files changed, 224 insertions, 208 deletions
diff --git a/src/main/java/de/pixart/messenger/services/AudioPlayer.java b/src/main/java/de/pixart/messenger/services/AudioPlayer.java
index e2600c100..e6d1e7c08 100644
--- a/src/main/java/de/pixart/messenger/services/AudioPlayer.java
+++ b/src/main/java/de/pixart/messenger/services/AudioPlayer.java
@@ -57,7 +57,11 @@ public class AudioPlayer implements View.OnClickListener, MediaPlayer.OnCompleti
}
private boolean init(ViewHolder viewHolder, Message message) {
- viewHolder.runtime.setTextColor(this.messageAdapter.getMessageTextColor(viewHolder.darkBackground, false));
+ if (viewHolder.darkBackground) {
+ viewHolder.runtime.setTextAppearance(this.messageAdapter.getContext(), R.style.TextAppearance_Conversations_Caption_OnDark);
+ } else {
+ viewHolder.runtime.setTextAppearance(this.messageAdapter.getContext(), R.style.TextAppearance_Conversations_Caption);
+ }
viewHolder.progress.setOnSeekBarChangeListener(this);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ColorStateList color = ContextCompat.getColorStateList(messageAdapter.getContext(), viewHolder.darkBackground ? R.color.white70 : R.color.bubble);
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 3bba088ad..b69cf637e 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -1008,7 +1008,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
this.mPgpFingerprint.setText(OpenPgpUtils.convertKeyIdToHex(pgpKeyId));
this.mPgpFingerprint.setOnClickListener(openPgp);
if ("pgp".equals(messageFingerprint)) {
- this.getmPgpFingerprintDesc.setTextColor(ContextCompat.getColor(this, R.color.accent));
+ this.getmPgpFingerprintDesc.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption_Highlight);
}
this.getmPgpFingerprintDesc.setOnClickListener(openPgp);
this.mPgpDeleteFingerprintButton.setOnClickListener(delete);
@@ -1038,10 +1038,10 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
if (ownAxolotlFingerprint != null && Config.supportOmemo()) {
this.mAxolotlFingerprintBox.setVisibility(View.VISIBLE);
if (ownAxolotlFingerprint.equals(messageFingerprint)) {
- this.mOwnFingerprintDesc.setTextColor(ContextCompat.getColor(this, R.color.accent));
+ this.mOwnFingerprintDesc.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption_Highlight);
this.mOwnFingerprintDesc.setText(R.string.omemo_fingerprint_selected_message);
} else {
- this.mOwnFingerprintDesc.setTextColor(getSecondaryTextColor());
+ this.mOwnFingerprintDesc.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption);
this.mOwnFingerprintDesc.setText(R.string.omemo_fingerprint);
}
this.mAxolotlFingerprint.setText(CryptoHelper.prettifyFingerprint(ownAxolotlFingerprint.substring(2)));
diff --git a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
index b278e146c..850188a2c 100644
--- a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
@@ -3,7 +3,6 @@ package de.pixart.messenger.ui;
import android.content.Intent;
import android.databinding.DataBindingUtil;
-import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.view.ContextMenu;
@@ -11,7 +10,6 @@ import android.view.MenuItem;
import android.view.View;
import android.widget.CompoundButton;
import android.widget.LinearLayout;
-import android.widget.TextView;
import android.widget.Toast;
import de.pixart.messenger.Config;
@@ -133,8 +131,8 @@ public abstract class OmemoActivity extends XmppActivity {
binding.tglTrust.setChecked(status.isTrusted());
if (status.isActive()) {
- binding.key.setTextColor(getPrimaryTextColor());
- binding.keyType.setTextColor(getSecondaryTextColor());
+ binding.key.setTextAppearance(this, R.style.TextAppearance_Conversations_Fingerprint);
+ binding.keyType.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption);
if (status.isVerified()) {
binding.verifiedFingerprint.setVisibility(View.VISIBLE);
binding.verifiedFingerprint.setAlpha(1.0f);
@@ -160,8 +158,8 @@ public abstract class OmemoActivity extends XmppActivity {
toast = v -> hideToast();
}
} else {
- binding.key.setTextColor(getTertiaryTextColor());
- binding.keyType.setTextColor(getTertiaryTextColor());
+ binding.key.setTextAppearance(this, R.style.TextAppearance_Conversations_Fingerprint_Disabled);
+ binding.keyType.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption_Disabled);
toast = v -> replaceToast(getString(R.string.this_device_is_no_longer_in_use), false);
if (status.isVerified()) {
binding.tglTrust.setVisibility(View.GONE);
@@ -184,7 +182,7 @@ public abstract class OmemoActivity extends XmppActivity {
binding.keyType.setVisibility(View.GONE);
}
if (highlight) {
- binding.keyType.setTextColor(ContextCompat.getColor(this, R.color.accent));
+ binding.keyType.setTextAppearance(this, R.style.TextAppearance_Conversations_Caption_Highlight);
binding.keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509_selected_message : R.string.omemo_fingerprint_selected_message));
} else {
binding.keyType.setText(getString(x509 ? R.string.omemo_fingerprint_x509 : R.string.omemo_fingerprint));
diff --git a/src/main/java/de/pixart/messenger/ui/XmppActivity.java b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
index 4ae530d37..38d7086f4 100644
--- a/src/main/java/de/pixart/messenger/ui/XmppActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/XmppActivity.java
@@ -906,10 +906,6 @@ public abstract class XmppActivity extends AppCompatActivity {
}
}
- public int getTertiaryTextColor() {
- return this.mTertiaryTextColor;
- }
-
public int getSecondaryTextColor() {
return this.mSecondaryTextColor;
}
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 defaffa99..436f0f219 100644
--- a/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
+++ b/src/main/java/de/pixart/messenger/ui/adapter/MessageAdapter.java
@@ -304,7 +304,7 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
break;
}
if (error && type == SENT) {
- viewHolder.time.setTextColor(activity.getWarningTextColor());
+ 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) {
@@ -329,6 +329,11 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.resend_button.setVisibility(View.GONE);
viewHolder.time.setTextColor(this.getMessageTextColor(darkBackground, false));
} else {
+ 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));
}
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
@@ -386,8 +391,11 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(text);
- viewHolder.messageBody.setTextColor(getMessageTextColor(darkBackground, false));
- viewHolder.messageBody.setTypeface(null, Typeface.ITALIC);
+ if (darkBackground) {
+ viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1_Secondary_OnDark);
+ } else {
+ viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1_Secondary);
+ }
viewHolder.messageBody.setTextIsSelectable(false);
}
@@ -396,10 +404,11 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.image.setVisibility(View.GONE);
viewHolder.audioPlayer.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
- viewHolder.messageBody.setText(getContext().getString(
- R.string.decryption_failed));
- viewHolder.messageBody.setTextColor(getMessageTextColor(darkBackground, false));
- viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
+ if (darkBackground) {
+ viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1_Secondary_OnDark);
+ } else {
+ viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1_Secondary);
+ }
viewHolder.messageBody.setTextIsSelectable(false);
}
@@ -507,8 +516,11 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
viewHolder.image.setVisibility(View.GONE);
viewHolder.audioPlayer.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
- viewHolder.messageBody.setTextColor(this.getMessageTextColor(darkBackground, true));
- viewHolder.messageBody.setLinkTextColor(this.getMessageTextColor(darkBackground, true));
+ if (darkBackground) {
+ viewHolder.messageBody.setTextAppearance(getContext(), R.style.TextAppearance_Conversations_Body1_OnDark);
+ } 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.setTypeface(null, Typeface.NORMAL);
if (message.getBody() != null) {
@@ -853,7 +865,6 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
} else {
viewHolder.status_message.setText(DateUtils.formatDateTime(activity, message.getTimeSent(), DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_SHOW_YEAR));
}
- viewHolder.status_message.setTextColor(activity.getSecondaryTextColor());
return view;
} else if (type == STATUS) {
if ("LOAD_MORE".equals(message.getBody())) {
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index e0ef55c6e..3df1ec353 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -495,18 +495,14 @@
android:id="@+id/pgp_fingerprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:fontFamily="monospace"
- android:textColor="@color/primary"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
<TextView
android:id="@+id/pgp_fingerprint_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/openpgp_key_id"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeInfo" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
<ImageButton
@@ -540,18 +536,14 @@
android:id="@+id/otr_fingerprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:fontFamily="monospace"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
<TextView
android:id="@+id/otr_fingerprint_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/otr_fingerprint"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeInfo" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
@@ -586,18 +578,13 @@
android:id="@+id/axolotl_fingerprint"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:fontFamily="monospace"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
<TextView
android:id="@+id/own_fingerprint_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/omemo_fingerprint"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeInfo" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
<LinearLayout
diff --git a/src/main/res/layout/activity_publish_profile_picture.xml b/src/main/res/layout/activity_publish_profile_picture.xml
index ee60dcae0..1df224831 100644
--- a/src/main/res/layout/activity_publish_profile_picture.xml
+++ b/src/main/res/layout/activity_publish_profile_picture.xml
@@ -82,8 +82,8 @@
android:layout_marginTop="8dp"
android:minLines="3"
android:textAlignment="center"
- android:textColor="?attr/color_text_primary"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1"
+ android:textColor="?attr/color_text_primary" />
</LinearLayout>
</android.support.v7.widget.CardView>
diff --git a/src/main/res/layout/activity_set_presence.xml b/src/main/res/layout/activity_set_presence.xml
index 1996e6fdf..8ecf792a8 100644
--- a/src/main/res/layout/activity_set_presence.xml
+++ b/src/main/res/layout/activity_set_presence.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="fill_parent"
@@ -31,15 +32,13 @@
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:hint="@string/status_message"
- android:inputType="textMultiLine"
- android:textColor="?attr/color_text_primary"
- android:textSize="?attr/TextSizeBody"/>
+ android:inputType="textMultiLine" />
<Spinner
android:id="@+id/presence_show"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"/>
+ android:layout_gravity="center_horizontal" />
<CheckBox
android:id="@+id/all_accounts"
@@ -47,9 +46,7 @@
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginTop="16dp"
- android:text="@string/all_accounts_on_this_device"
- android:textColor="?attr/color_text_primary"
- android:textSize="?attr/TextSizeBody"/>
+ android:text="@string/all_accounts_on_this_device" />
<Button
android:id="@+id/change_presence"
@@ -60,7 +57,7 @@
android:layout_marginBottom="-8dp"
android:layout_marginRight="-8dp"
android:text="@string/change_presence"
- android:textColor="@color/accent"/>
+ android:textColor="@color/accent" />
</LinearLayout>
</android.support.v7.widget.CardView>
@@ -78,7 +75,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
- android:padding="@dimen/card_padding_regular"/>
+ android:padding="@dimen/card_padding_list" />
</android.support.v7.widget.CardView>
</LinearLayout>
</ScrollView>
diff --git a/src/main/res/layout/activity_share_locaction.xml b/src/main/res/layout/activity_share_locaction.xml
index c9a146825..2185ddc29 100644
--- a/src/main/res/layout/activity_share_locaction.xml
+++ b/src/main/res/layout/activity_share_locaction.xml
@@ -7,23 +7,22 @@
<WebView
android:id="@+id/webView"
- android:layout_above="@+id/snackbar"
android:layout_width="match_parent"
- android:layout_height="match_parent">
- </WebView>
+ android:layout_height="match_parent"
+ android:layout_above="@+id/snackbar"></WebView>
<RelativeLayout
android:id="@+id/snackbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="4dp"
+ android:layout_above="@+id/button_bar"
android:layout_marginBottom="4dp"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
- android:layout_above="@+id/button_bar"
+ android:layout_marginTop="4dp"
android:background="@drawable/snackbar"
android:minHeight="48dp"
- android:visibility="visible" >
+ android:visibility="visible">
<TextView
android:layout_width="wrap_content"
@@ -32,26 +31,24 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/snackbar_action"
android:paddingLeft="24dp"
- android:textColor="@color/white"
- android:textSize="?attr/TextSizeBody"
- android:text="@string/location_sharing_disabled"/>
+ android:text="@string/location_sharing_disabled"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" />
<TextView
android:id="@+id/snackbar_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_alignParentTop="true"
android:paddingBottom="16dp"
android:paddingLeft="24dp"
android:paddingRight="24dp"
android:paddingTop="16dp"
- android:textAllCaps="true"
- android:textColor="@color/white"
- android:textSize="?attr/TextSizeBody"
- android:textStyle="bold"
android:text="@string/enable"
- android:layout_alignParentTop="true"
- android:layout_alignParentRight="true"
- android:layout_alignParentEnd="true"/>
+ android:textAllCaps="true"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"
+ android:textStyle="bold" />
</RelativeLayout>
<LinearLayout
diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml
index a9bb0e49d..45b1c5ca3 100644
--- a/src/main/res/layout/contact_key.xml
+++ b/src/main/res/layout/contact_key.xml
@@ -20,7 +20,6 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="true"
- android:fontFamily="monospace"
android:longClickable="true"
android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
diff --git a/src/main/res/layout/dialog_show_password.xml b/src/main/res/layout/dialog_show_password.xml
index 299b65dca..7d73f0dec 100644
--- a/src/main/res/layout/dialog_show_password.xml
+++ b/src/main/res/layout/dialog_show_password.xml
@@ -13,7 +13,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:typeface="monospace"
- android:textSize="?attr/TextSizeHeadline"
+ android:textSize="?attr/TextSizeBody"
android:fontFamily="monospace"
android:layout_gravity="center_horizontal"
android:textColor="@color/black87"></TextView>
diff --git a/src/main/res/layout/dialog_verify_fingerprints.xml b/src/main/res/layout/dialog_verify_fingerprints.xml
index 38c1cfa2b..ce2be3dae 100644
--- a/src/main/res/layout/dialog_verify_fingerprints.xml
+++ b/src/main/res/layout/dialog_verify_fingerprints.xml
@@ -3,23 +3,22 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
+ android:paddingBottom="?attr/dialog_vertical_padding"
android:paddingLeft="?attr/dialog_horizontal_padding"
android:paddingRight="?attr/dialog_horizontal_padding"
- android:paddingBottom="?attr/dialog_vertical_padding"
android:paddingTop="?attr/dialog_vertical_padding">
<TextView
android:id="@+id/warning"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="?attr/TextSizeBody"
- android:textColor="@color/accent"/>
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
+
<CheckBox
- android:layout_marginTop="8dp"
android:id="@+id/trusted_source"
android:layout_width="wrap_content"
- android:textColor="@color/accent"
android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
android:text="@string/i_followed_this_link_from_a_trusted_source" />
</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/fragment_conversation.xml b/src/main/res/layout/fragment_conversation.xml
index e969efaee..8c4acf3c6 100644
--- a/src/main/res/layout/fragment_conversation.xml
+++ b/src/main/res/layout/fragment_conversation.xml
@@ -146,8 +146,7 @@
android:layout_centerVertical="true"
android:layout_toLeftOf="@+id/snackbar_action"
android:paddingLeft="24dp"
- android:textColor="@color/white70"
- android:textSize="?attr/TextSizeBody" />
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark" />
<TextView
android:id="@+id/snackbar_action"
@@ -160,8 +159,7 @@
android:paddingRight="24dp"
android:paddingTop="16dp"
android:textAllCaps="true"
- android:textColor="@color/white"
- android:textSize="?attr/TextSizeBody"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.OnDark"
android:textStyle="bold" />
</RelativeLayout>
diff --git a/src/main/res/layout/list_item_tag.xml b/src/main/res/layout/list_item_tag.xml
index fcb7dd984..53684df83 100644
--- a/src/main/res/layout/list_item_tag.xml
+++ b/src/main/res/layout/list_item_tag.xml
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_height="wrap_content"
android:layout_width="wrap_content"
- android:paddingTop="1dp"
+ android:layout_height="wrap_content"
+ android:layout_margin="2dp"
+ android:maxLines="1"
android:paddingBottom="1dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
- android:textSize="?attr/TextSizeInfo"
- android:textColor="@color/white"
+ android:paddingTop="1dp"
android:textAllCaps="true"
- android:maxLines="1"
- android:layout_margin="2dp" /> \ No newline at end of file
+ android:textAppearance="@style/TextAppearance.Conversations.Tag" /> \ No newline at end of file
diff --git a/src/main/res/layout/message_content.xml b/src/main/res/layout/message_content.xml
index df6e8500d..e1b06913e 100644
--- a/src/main/res/layout/message_content.xml
+++ b/src/main/res/layout/message_content.xml
@@ -1,73 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
-xmlns:app="http://schemas.android.com/apk/res-auto">
+ xmlns:app="http://schemas.android.com/apk/res-auto">
-<com.makeramen.roundedimageview.RoundedImageView
- android:id="@+id/message_image"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginBottom="4dp"
- android:layout_marginTop="2dp"
- android:adjustViewBounds="true"
- android:longClickable="true"
- android:maxHeight="500dp"
- android:maxWidth="500dp"
- android:scaleType="centerCrop"
- app:riv_border_color="@color/grey500"
- app:riv_border_width="1dp"
- app:riv_corner_radius="5dp" />
+ <com.makeramen.roundedimageview.RoundedImageView
+ android:id="@+id/message_image"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="4dp"
+ android:layout_marginTop="2dp"
+ android:adjustViewBounds="true"
+ android:longClickable="true"
+ android:maxHeight="500dp"
+ android:maxWidth="500dp"
+ android:scaleType="centerCrop"
+ app:riv_border_color="@color/grey500"
+ app:riv_border_width="1dp"
+ app:riv_corner_radius="5dp" />
-<de.pixart.messenger.ui.widget.CopyTextView
- android:id="@+id/message_body"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:autoLink="web"
- android:longClickable="true"
- android:textColor="@color/dark"
- android:textColorHighlight="@color/grey800"
- android:textColorLink="@color/dark"
- android:textSize="?attr/TextSizeBody" />
+ <de.pixart.messenger.ui.widget.CopyTextView
+ android:id="@+id/message_body"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:autoLink="web"
+ android:longClickable="true"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1" />
-<Button
- android:id="@+id/download_button"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:longClickable="true"
- android:visibility="gone" />
+ <Button
+ android:id="@+id/download_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:longClickable="true"
+ android:visibility="gone" />
<RelativeLayout
- android:id="@+id/audio_player"
- android:layout_width="@dimen/audio_player_width"
- android:layout_height="wrap_content"
- android:visibility="gone"
- >
+ android:id="@+id/audio_player"
+ android:layout_width="@dimen/audio_player_width"
+ android:layout_height="wrap_content"
+ android:visibility="gone">
- <ImageButton
- android:id="@+id/play_pause"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:alpha="1.0"
- android:background="?attr/selectableItemBackgroundBorderless"/>
+ <ImageButton
+ android:id="@+id/play_pause"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+ android:alpha="1.0"
+ android:background="?attr/selectableItemBackgroundBorderless" />
- <TextView
- android:id="@+id/runtime"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentEnd="true"
- android:layout_alignParentRight="true"
- android:paddingBottom="16dp"
- android:paddingRight="16dp"
- android:textColor="@color/primary"
- android:textSize="?attr/TextSizeInfo"/>
+ <TextView
+ android:id="@+id/runtime"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:paddingBottom="16dp"
+ android:paddingRight="16dp"
+ android:textAppearance="@style/TextAppearance.Conversations.Caption" />
- <SeekBar
- android:id="@+id/progress"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_below="@+id/runtime"
- android:layout_centerVertical="true"
- android:layout_toRightOf="@+id/play_pause"
- android:progress="100"/>
- </RelativeLayout>
+ <SeekBar
+ android:id="@+id/progress"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@+id/runtime"
+ android:layout_centerVertical="true"
+ android:layout_toRightOf="@+id/play_pause"
+ android:progress="100" />
+ </RelativeLayout>
</merge> \ No newline at end of file
diff --git a/src/main/res/layout/message_date_bubble.xml b/src/main/res/layout/message_date_bubble.xml
index c94c7d4a0..cc46a32f4 100644
--- a/src/main/res/layout/message_date_bubble.xml
+++ b/src/main/res/layout/message_date_bubble.xml
@@ -22,8 +22,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="01.01.2017"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeInfo"
+ android:textAppearance="@style/TextAppearance.Conversations.Body1.Secondary"
android:textStyle="italic" />
</LinearLayout>
diff --git a/src/main/res/layout/message_received.xml b/src/main/res/layout/message_received.xml
index 6c50f2bae..4d5334743 100644
--- a/src/main/res/layout/message_received.xml
+++ b/src/main/res/layout/message_received.xml
@@ -16,8 +16,8 @@
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
- app:riv_border_width="1dip"
app:riv_border_color="@color/grey500"
+ app:riv_border_width="1dip"
app:riv_corner_radius="24dp" />
<LinearLayout
@@ -25,12 +25,12 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
- android:layout_toRightOf="@+id/message_photo"
- android:minHeight="48dp"
- android:longClickable="true"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
- android:background="@drawable/message_bubble_received_white">
+ android:layout_toRightOf="@+id/message_photo"
+ android:background="@drawable/message_bubble_received_white"
+ android:longClickable="true"
+ android:minHeight="48dp">
<LinearLayout
android:layout_width="wrap_content"
@@ -39,7 +39,7 @@
android:orientation="vertical"
android:padding="2dp">
- <include layout="@layout/message_content"/>
+ <include layout="@layout/message_content" />
<LinearLayout
android:layout_width="wrap_content"
@@ -53,11 +53,10 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
- android:gravity="center_vertical"
android:layout_marginRight="4sp"
- android:textColor="@color/white70"
- android:textStyle="bold"
- android:textSize="?attr/TextSizeInfo" />
+ android:gravity="center_vertical"
+ android:textAppearance="@style/TextAppearance.Conversations.Caption"
+ android:textStyle="bold" />
<ImageView
android:id="@+id/security_indicator"
@@ -84,8 +83,7 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/sending"
- android:textColor="@color/primary"
- android:textSize="?attr/TextSizeInfo" />
+ android:textAppearance="@style/TextAppearance.Conversations.Caption" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index 15a52a797..d51f2d998 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -13,26 +13,26 @@
android:id="@+id/message_photo"
android:layout_width="48dp"
android:layout_height="48dp"
- android:scaleType="fitXY"
android:layout_alignParentBottom="true"
- android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
- app:riv_border_width="1dp"
+ android:layout_alignParentRight="true"
+ android:scaleType="fitXY"
app:riv_border_color="@color/grey500"
+ app:riv_border_width="1dp"
app:riv_corner_radius="24dp" />
<LinearLayout
android:id="@+id/message_box"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:minHeight="48dp"
- android:longClickable="true"
android:layout_alignParentBottom="true"
- android:layout_toLeftOf="@+id/message_photo"
- android:layout_toStartOf="@+id/message_photo"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
- android:background="@drawable/message_bubble_sent_lightblue">
+ android:layout_toLeftOf="@+id/message_photo"
+ android:layout_toStartOf="@+id/message_photo"
+ android:background="@drawable/message_bubble_sent_lightblue"
+ android:longClickable="true"
+ android:minHeight="48dp">
<LinearLayout
android:layout_width="wrap_content"
@@ -41,7 +41,7 @@
android:orientation="vertical"
android:padding="2dp">
- <include layout="@layout/message_content"/>
+ <include layout="@layout/message_content" />
<Button
android:id="@+id/resend_button"
@@ -64,8 +64,7 @@
android:layout_gravity="center_vertical"
android:gravity="center_vertical"
android:text="@string/sending"
- android:textColor="@color/primary"
- android:textSize="?attr/TextSizeInfo" />
+ android:textAppearance="@style/TextAppearance.Conversations.Caption" />
<ImageView
android:id="@+id/security_indicator"
@@ -99,10 +98,10 @@
android:layout_width="?attr/TextSizeInfo"
android:layout_height="?attr/TextSizeInfo"
android:layout_gravity="center_vertical"
- android:gravity="center_vertical"
- android:src="@drawable/ic_read_indicator"
android:layout_marginLeft="-8sp"
- android:adjustViewBounds="false" />
+ android:adjustViewBounds="false"
+ android:gravity="center_vertical"
+ android:src="@drawable/ic_read_indicator" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
diff --git a/src/main/res/layout/message_status.xml b/src/main/res/layout/message_status.xml
index 835e380a5..b6edbc0b1 100644
--- a/src/main/res/layout/message_status.xml
+++ b/src/main/res/layout/message_status.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingLeft="8dp"
@@ -14,14 +14,13 @@
style="?android:attr/borderlessButtonStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/load_more_messages"
- android:textColor="@color/accent"
+ android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
- android:layout_centerHorizontal="true" />
+ android:text="@string/load_more_messages"
+ android:textColor="@color/accent" />
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/message_photo"
- android:visibility="gone"
android:layout_width="32dp"
android:layout_height="32dp"
android:layout_alignParentLeft="true"
@@ -29,23 +28,22 @@
android:layout_marginRight="-1.5dp"
android:padding="0dp"
android:scaleType="fitXY"
- app:riv_border_width="1dp"
+ android:visibility="gone"
app:riv_border_color="@color/grey500"
- app:riv_corner_radius="16dp"/>
+ app:riv_border_width="1dp"
+ app:riv_corner_radius="16dp" />
<TextView
android:id="@+id/status_message"
- android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:minHeight="32dp"
android:layout_centerVertical="true"
- android:gravity="center_vertical"
android:layout_marginLeft="8dp"
android:layout_toEndOf="@+id/message_photo"
android:layout_toRightOf="@+id/message_photo"
+ android:gravity="center_vertical"
+ android:minHeight="32dp"
android:text="@string/contact_has_read_up_to_this_point"
- android:textColor="?attr/color_text_secondary"
- android:textSize="?attr/TextSizeInfo"
- android:textStyle="italic"/>
+ android:textAppearance="@style/TextAppearance.Conversations.Status"
+ android:visibility="gone" />
</RelativeLayout> \ No newline at end of file
diff --git a/src/main/res/layout/presence_template.xml b/src/main/res/layout/presence_template.xml
index 6fe5ec40a..3d64ea468 100644
--- a/src/main/res/layout/presence_template.xml
+++ b/src/main/res/layout/presence_template.xml
@@ -1,51 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/presence_template"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/activatedBackgroundIndicator"
- android:paddingTop="8dp"
- android:paddingLeft="8dp"
- android:paddingBottom="8dp"
- android:id="@+id/presence_template">
+ android:padding="12dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical"
- android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
+ android:layout_centerVertical="true"
+ android:layout_marginRight="8dp"
android:layout_toLeftOf="@+id/delete_button"
android:layout_toStartOf="@+id/delete_button"
- android:layout_marginRight="8dp">
+ android:minHeight="48dp"
+ android:orientation="vertical">
<android.support.text.emoji.widget.EmojiTextView
+ android:id="@+id/presence_status_message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:id="@+id/presence_status_message"
- android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
android:paddingBottom="1dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:paddingTop="1dp"
android:textAllCaps="true"
- android:textColor="@color/white"
- android:textSize="?attr/TextSizeInfo"
- android:layout_marginTop="4dp" />
+ android:textAppearance="@style/TextAppearance.Conversations.Tag" />
</LinearLayout>
<ImageButton
+ android:id="@+id/delete_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/delete_button"
- android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/image_button_padding"
android:src="?attr/icon_remove" />
diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml
index cb341bd26..6cc678c35 100644
--- a/src/main/res/values/styles.xml
+++ b/src/main/res/values/styles.xml
@@ -1,11 +1,12 @@
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
+<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
+
<style name="TextAppearance.Conversations.Body1.Secondary" parent="TextAppearance.AppCompat.Body1">
<item name="android:textColor">?android:textColorSecondary</item>
</style>
<style name="TextAppearance.Conversations.Fingerprint" parent="TextAppearance.AppCompat.Body1">
- <item name="android:fontFamily">monospace</item>
+ <item name="android:fontFamily" tools:targetApi="jelly_bean">monospace</item>
<item name="android:typeface">monospace</item>
</style>
@@ -15,4 +16,47 @@
<item name="android:paddingRight">@dimen/input_label_horizontal_spacing</item>
</style>
+ <style name="TextAppearance.Conversations.Status" parent="TextAppearance.AppCompat.Caption">
+ <item name="android:textStyle">italic</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Tag" parent="TextAppearance.AppCompat.Caption">
+ <item name="android:textColor">@color/white</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Caption.OnDark" parent="TextAppearance.Conversations.Caption">
+ <item name="android:textColor">@color/white70</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Caption" parent="TextAppearance.AppCompat.Caption"></style>
+
+ <style name="TextAppearance.Conversations.Caption.Waring" parent="TextAppearance.Conversations.Caption">
+ <item name="android:textColor">@color/red800</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Caption.Highlight" parent="TextAppearance.Conversations.Caption">
+ <item name="android:textColor">?android:colorAccent</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Caption.Disabled" parent="TextAppearance.Conversations.Caption">
+ <item name="android:textColor">?android:textColorTertiary</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Fingerprint.Disabled" parent="TextAppearance.Conversations.Fingerprint">
+ <item name="android:textColor">?android:textColorTertiary</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Body1.OnDark" parent="TextAppearance.AppCompat.Body1">
+ <item name="android:textColor">@color/white</item>
+ <item name="android:textColorLink">@color/white</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Body1.Secondary.OnDark" parent="TextAppearance.AppCompat.Body1">
+ <item name="android:textColor">@color/white70</item>
+ </style>
+
+ <style name="TextAppearance.Conversations.Body1" parent="TextAppearance.AppCompat.Body1">
+ <item name="android:textColorLink">?android:textColorPrimary</item>
+ </style>
+
</resources> \ No newline at end of file