aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-12-18 21:48:20 +0100
committerChristian Schneppe <christian@pix-art.de>2016-12-18 21:48:20 +0100
commitc25a6520a0eed6635262a4124d1dbdc10a6972e4 (patch)
treec8d703fc82143bf331ef40c6d9d1c20376edd506 /src/main/java/de/pixart/messenger/ui
parentc5c02d306fdab8dc929d0c6cfd2fd186dfc70534 (diff)
show jid monospaced in verify dialog
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/BlockContactDialog.java1
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java11
2 files changed, 10 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java b/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java
index d1c6b56d6..3be0d9344 100644
--- a/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java
+++ b/src/main/java/de/pixart/messenger/ui/BlockContactDialog.java
@@ -37,7 +37,6 @@ public final class BlockContactDialog {
builder.setTitle(isBlocked ? R.string.action_unblock_domain : R.string.action_block_domain);
value = blockable.getJid().toDomainJid().toString();
spannable = new SpannableString(context.getString(isBlocked ? R.string.unblock_domain_text : R.string.block_domain_text, value));
- message.setText(spannable);
} else {
builder.setTitle(isBlocked ? R.string.action_unblock_contact : R.string.action_block_contact);
value = blockable.getJid().toBareJid().toString();
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index edbb3856b..0e148731d 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -28,7 +28,10 @@ import android.os.Parcelable;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.text.Editable;
+import android.text.SpannableString;
+import android.text.Spanned;
import android.text.TextWatcher;
+import android.text.style.TypefaceSpan;
import android.util.Pair;
import android.view.ContextMenu;
import android.view.ContextMenu.ContextMenuInfo;
@@ -892,7 +895,13 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
View view = getLayoutInflater().inflate(R.layout.dialog_verify_fingerprints, null);
final CheckBox isTrustedSource = (CheckBox) view.findViewById(R.id.trusted_source);
TextView warning = (TextView) view.findViewById(R.id.warning);
- warning.setText(getString(R.string.verifying_omemo_keys_trusted_source, contact.getJid().toBareJid().toString(), contact.getDisplayName()));
+ String jid = contact.getJid().toBareJid().toString();
+ SpannableString spannable = new SpannableString(getString(R.string.verifying_omemo_keys_trusted_source,jid,contact.getDisplayName()));
+ int start = spannable.toString().indexOf(jid);
+ if (start >= 0) {
+ spannable.setSpan(new TypefaceSpan("monospace"),start,start + jid.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ }
+ warning.setText(spannable);
builder.setView(view);
builder.setPositiveButton(R.string.confirm, new OnClickListener() {
@Override