From af80c6b04562a6adf49e6c1e098f0c64d1d778b2 Mon Sep 17 00:00:00 2001 From: Mohamed Zenadi Date: Sat, 9 May 2015 14:45:10 +0200 Subject: use a true monospaced font for pwd display --- app/src/main/assets/fonts/sourcecodepro.ttf | Bin 0 -> 52660 bytes .../main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 app/src/main/assets/fonts/sourcecodepro.ttf (limited to 'app') diff --git a/app/src/main/assets/fonts/sourcecodepro.ttf b/app/src/main/assets/fonts/sourcecodepro.ttf new file mode 100644 index 00000000..6eb48e7d Binary files /dev/null and b/app/src/main/assets/fonts/sourcecodepro.ttf differ diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index c3e96f21..2f638847 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -9,6 +9,7 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.IntentSender; import android.content.SharedPreferences; +import android.graphics.Typeface; import android.os.AsyncTask; import android.os.Bundle; import android.os.SystemClock; @@ -325,13 +326,17 @@ public class PgpHandler extends ActionBarActivity implements OpenPgpServiceConne try { if (returnToCiphertextField) { findViewById(R.id.crypto_container).setVisibility(View.VISIBLE); - + Typeface type = Typeface.createFromAsset(getAssets(), "fonts/sourcecodepro.ttf"); String[] passContent = os.toString("UTF-8").split("\n"); + ((TextView) findViewById(R.id.crypto_password_show)) + .setTypeface(type); ((TextView) findViewById(R.id.crypto_password_show)) .setText(passContent[0]); String extraContent = os.toString("UTF-8").replaceFirst(".*\n", ""); if (extraContent.length() != 0) { + ((TextView) findViewById(R.id.crypto_extra_show)) + .setTypeface(type); ((TextView) findViewById(R.id.crypto_extra_show)) .setText(extraContent); } -- cgit v1.2.3