aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/ui/OmemoActivity.java37
-rw-r--r--src/main/res/layout/activity_edit_account.xml33
-rw-r--r--src/main/res/layout/captcha.xml11
-rw-r--r--src/main/res/layout/certificate_information.xml99
-rw-r--r--src/main/res/layout/contact.xml5
-rw-r--r--src/main/res/layout/contact_key.xml8
-rw-r--r--src/main/res/layout/dialog_block_contact.xml11
-rw-r--r--src/main/res/layout/dialog_clear_history.xml9
-rw-r--r--src/main/res/layout/magic_create.xml12
-rw-r--r--src/main/res/layout/presence_template.xml3
-rw-r--r--src/main/res/layout/welcome.xml11
-rw-r--r--src/main/res/values/styles.xml5
12 files changed, 43 insertions, 201 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
index 1ee2f9355..b278e146c 100644
--- a/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/OmemoActivity.java
@@ -14,8 +14,6 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
-import java.security.cert.X509Certificate;
-
import de.pixart.messenger.Config;
import de.pixart.messenger.R;
import de.pixart.messenger.crypto.axolotl.FingerprintStatus;
@@ -125,10 +123,6 @@ public abstract class OmemoActivity extends XmppActivity {
CompoundButton.OnCheckedChangeListener
onCheckedChangeListener) {
ContactKeyBinding binding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.contact_key, keys, true);
- if (Config.X509_VERIFICATION && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509) {
- binding.key.setOnClickListener(v -> showX509Certificate(account, fingerprint));
- binding.keyType.setOnClickListener(v -> showX509Certificate(account, fingerprint));
- }
binding.tglTrust.setVisibility(View.VISIBLE);
registerForContextMenu(binding.getRoot());
binding.getRoot().setTag(R.id.TAG_ACCOUNT, account);
@@ -212,37 +206,6 @@ public abstract class OmemoActivity extends XmppActivity {
builder.create().show();
}
- private void showX509Certificate(Account account, String fingerprint) {
- X509Certificate x509Certificate = account.getAxolotlService().getFingerprintCertificate(fingerprint);
- if (x509Certificate != null) {
- showCertificateInformationDialog(CryptoHelper.extractCertificateInformation(x509Certificate));
- } else {
- Toast.makeText(this, R.string.certificate_not_found, Toast.LENGTH_SHORT).show();
- }
- }
-
- private void showCertificateInformationDialog(Bundle bundle) {
- View view = getLayoutInflater().inflate(R.layout.certificate_information, null);
- final String not_available = getString(R.string.certicate_info_not_available);
- TextView subject_cn = (TextView) view.findViewById(R.id.subject_cn);
- TextView subject_o = (TextView) view.findViewById(R.id.subject_o);
- TextView issuer_cn = (TextView) view.findViewById(R.id.issuer_cn);
- TextView issuer_o = (TextView) view.findViewById(R.id.issuer_o);
- TextView sha1 = (TextView) view.findViewById(R.id.sha1);
-
- subject_cn.setText(bundle.getString("subject_cn", not_available));
- subject_o.setText(bundle.getString("subject_o", not_available));
- issuer_cn.setText(bundle.getString("issuer_cn", not_available));
- issuer_o.setText(bundle.getString("issuer_o", not_available));
- sha1.setText(bundle.getString("sha1", not_available));
-
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle(R.string.certificate_information);
- builder.setView(view);
- builder.setPositiveButton(R.string.ok, null);
- builder.create().show();
- }
-
@Override
public void onRequestPermissionsResult(int requestCode, String permissions[], int[] grantResults) {
ScanActivity.onRequestPermissionResult(this, requestCode, grantResults);
diff --git a/src/main/res/layout/activity_edit_account.xml b/src/main/res/layout/activity_edit_account.xml
index 01cd2b5de..e0ef55c6e 100644
--- a/src/main/res/layout/activity_edit_account.xml
+++ b/src/main/res/layout/activity_edit_account.xml
@@ -180,10 +180,7 @@
android:id="@+id/os_optimization_headline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/battery_optimizations_enabled"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
<TextView
android:id="@+id/os_optimization_body"
@@ -193,8 +190,7 @@
android:layout_marginBottom="8dp"
android:layout_marginTop="8dp"
android:text="@string/battery_optimizations_enabled_explained"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<Button
android:id="@+id/os_optimization_disable"
@@ -654,26 +650,23 @@
android:layout_height="wrap_content"
android:layout_margin="@dimen/list_padding"
android:text="@string/other_devices"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
<LinearLayout
android:id="@+id/other_device_keys"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:divider="?android:dividerHorizontal"
- android:orientation="vertical"
- android:showDividers="middle"></LinearLayout>
+ android:orientation="vertical">
- <Button
- android:id="@+id/clear_devices"
- style="?android:attr/borderlessButtonStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal"
- android:text="@string/clear_other_devices"
- android:textColor="@color/accent" />
+ <Button
+ android:id="@+id/clear_devices"
+ style="?android:attr/borderlessButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_horizontal"
+ android:text="@string/clear_other_devices"
+ android:textColor="@color/accent" />
+ </LinearLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
diff --git a/src/main/res/layout/captcha.xml b/src/main/res/layout/captcha.xml
index 08e685db4..29bcc4287 100644
--- a/src/main/res/layout/captcha.xml
+++ b/src/main/res/layout/captcha.xml
@@ -6,21 +6,18 @@
android:padding="16dp">
<ImageView
+ android:id="@+id/captcha"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:id="@+id/captcha"
android:layout_gravity="center_horizontal" />
<EditText
android:id="@+id/input"
- android:layout_marginTop="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:inputType="textNoSuggestions"
- android:textColor="@color/black87"
- android:textColorHint="@color/black54"
- android:textSize="?attr/TextSizeBody"
- android:hint="@string/captcha_hint">
+ android:layout_marginTop="8dp"
+ android:hint="@string/captcha_hint"
+ android:inputType="textNoSuggestions">
<requestFocus />
</EditText>
diff --git a/src/main/res/layout/certificate_information.xml b/src/main/res/layout/certificate_information.xml
deleted file mode 100644
index 18925c82b..000000000
--- a/src/main/res/layout/certificate_information.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:padding="16dp">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_subject"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeHeadline" />
-
- <TextView
- android:layout_marginTop="8dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_cn"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/subject_cn"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_marginTop="8dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_o"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/subject_o"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_marginTop="16dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_issuer"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeHeadline" />
-
- <TextView
- android:layout_marginTop="8dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_cn"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/issuer_cn"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_marginTop="8dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_o"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/issuer_o"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_marginTop="16dp"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/certificate_sha1"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:id="@+id/sha1"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace"
- android:fontFamily="monospace" />
-</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/contact.xml b/src/main/res/layout/contact.xml
index eea98181e..08e793ef0 100644
--- a/src/main/res/layout/contact.xml
+++ b/src/main/res/layout/contact.xml
@@ -50,10 +50,7 @@
android:id="@+id/key"
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"
android:visibility="gone" />
</LinearLayout>
diff --git a/src/main/res/layout/contact_key.xml b/src/main/res/layout/contact_key.xml
index 0aa695ea8..a9bb0e49d 100644
--- a/src/main/res/layout/contact_key.xml
+++ b/src/main/res/layout/contact_key.xml
@@ -19,13 +19,10 @@
android:id="@+id/key"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
-
android:clickable="true"
android:fontFamily="monospace"
android:longClickable="true"
- android:textColor="?attr/color_text_primary"
- android:textSize="?attr/TextSizeBody"
- android:typeface="monospace" />
+ android:textAppearance="@style/TextAppearance.Conversations.Fingerprint" />
<TextView
android:id="@+id/key_type"
@@ -34,8 +31,7 @@
android:clickable="true"
android:longClickable="true"
android:maxLines="1"
- android:textColor="?attr/color_text_secondary"
- android:textSize="?attr/TextSizeInfo" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption" />
</LinearLayout>
<LinearLayout
diff --git a/src/main/res/layout/dialog_block_contact.xml b/src/main/res/layout/dialog_block_contact.xml
index 2e43f6af8..c2d945b3c 100644
--- a/src/main/res/layout/dialog_block_contact.xml
+++ b/src/main/res/layout/dialog_block_contact.xml
@@ -3,24 +3,23 @@
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/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="?attr/TextSizeBody"
- android:textColor="@color/black87" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<CheckBox
- android:layout_marginTop="8dp"
android:id="@+id/report_spam"
android:layout_width="wrap_content"
- android:textColor="@color/black87"
android:layout_height="wrap_content"
- android:text="@string/report_jid_as_spammer" />
+ android:layout_marginTop="8dp"
+ android:text="@string/report_jid_as_spammer"
+ android:textColor="@color/black87" />
</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/dialog_clear_history.xml b/src/main/res/layout/dialog_clear_history.xml
index 673923dc1..3209d1e62 100644
--- a/src/main/res/layout/dialog_clear_history.xml
+++ b/src/main/res/layout/dialog_clear_history.xml
@@ -3,25 +3,24 @@
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:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textColor="@color/black87"
- android:paddingBottom="8dp"
+ android:layout_marginBottom="8dp"
android:text="@string/clear_histor_msg"
- android:textSize="?attr/TextSizeBody" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<CheckBox
android:id="@+id/end_conversation_checkbox"
android:layout_width="wrap_content"
- android:textColor="@color/black87"
android:layout_height="wrap_content"
android:text="@string/also_end_conversation"
+ android:textColor="@color/black87"
android:visibility="gone" />
</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/magic_create.xml b/src/main/res/layout/magic_create.xml
index ec3bfefff..9d3dd9322 100644
--- a/src/main/res/layout/magic_create.xml
+++ b/src/main/res/layout/magic_create.xml
@@ -31,17 +31,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/pick_your_username"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/magic_create_text"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<EditText
android:id="@+id/username"
@@ -49,7 +46,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:hint="@string/username_hint"
- android:textSize="?attr/TextSizeBody" />
+ android:inputType="textNoSuggestions" />
<TextView
android:id="@+id/full_jid"
@@ -57,8 +54,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/your_full_jid_will_be"
- android:textColor="@color/black54"
- android:textSize="?attr/TextSizeInfo"
+ android:textAppearance="@style/TextAppearance.AppCompat.Caption"
android:visibility="invisible" />
<Button
diff --git a/src/main/res/layout/presence_template.xml b/src/main/res/layout/presence_template.xml
index b305f18db..6fe5ec40a 100644
--- a/src/main/res/layout/presence_template.xml
+++ b/src/main/res/layout/presence_template.xml
@@ -23,8 +23,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/presence_status_message"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1"/>
<android.support.text.emoji.widget.EmojiTextView
android:id="@+id/status"
diff --git a/src/main/res/layout/welcome.xml b/src/main/res/layout/welcome.xml
index 2fb9667a5..e81e1f95d 100644
--- a/src/main/res/layout/welcome.xml
+++ b/src/main/res/layout/welcome.xml
@@ -31,27 +31,24 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/welcome_header"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeHeadline"
- android:textStyle="bold" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Title" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/welcome_text"
- android:textColor="@color/black87"
- android:textSize="?attr/TextSizeBody" />
+ android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
+ android:id="@id/import_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/import_text"
android:textColor="@color/black87"
android:textSize="?attr/TextSizeBody"
- android:visibility="gone"
- android:id="@id/import_text" />
+ android:visibility="gone" />
<Button
android:id="@+id/import_database"
diff --git a/src/main/res/values/styles.xml b/src/main/res/values/styles.xml
index d8e201664..cb341bd26 100644
--- a/src/main/res/values/styles.xml
+++ b/src/main/res/values/styles.xml
@@ -4,6 +4,11 @@
<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:typeface">monospace</item>
+ </style>
+
<style name="InputLabel" parent="TextAppearance.AppCompat.Caption">
<item name="android:paddingBottom">@dimen/input_label_vertical_spacing</item>
<item name="android:paddingLeft">@dimen/input_label_horizontal_spacing</item>