aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/crypto
diff options
context:
space:
mode:
authorMohamed Zenadi <mohamed@zenadi.com>2015-07-18 20:11:18 +0200
committerMohamed Zenadi <mohamed@zenadi.com>2015-07-18 20:11:18 +0200
commitba1ce73dbaa3a60691b223dd7f131e3c05ddc683 (patch)
treec44241a29cefb8ea96e1e7291ad43fe8a0ae1408 /app/src/main/java/com/zeapo/pwdstore/crypto
parent62c20d323cee5c543fd17cdc6e817efd48d1e47b (diff)
downloadHardenedPass-ba1ce73dbaa3a60691b223dd7f131e3c05ddc683.tar.gz
HardenedPass-ba1ce73dbaa3a60691b223dd7f131e3c05ddc683.zip
use monospaced font for passwords
fix EditText being cast to textview
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/crypto')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java9
1 files changed, 6 insertions, 3 deletions
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 9c0bc877..2d007618 100644
--- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
+++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java
@@ -327,17 +327,17 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
if (showPassword) {
findViewById(R.id.crypto_container).setVisibility(View.VISIBLE);
- Typeface type = Typeface.createFromAsset(getAssets(), "fonts/sourcecodepro.ttf");
+ Typeface monoTypeface = Typeface.createFromAsset(getAssets(), "fonts/sourcecodepro.ttf");
String[] passContent = os.toString("UTF-8").split("\n");
((TextView) findViewById(R.id.crypto_password_show))
- .setTypeface(type);
+ .setTypeface(monoTypeface);
((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);
+ .setTypeface(monoTypeface);
((TextView) findViewById(R.id.crypto_extra_show))
.setText(extraContent);
}
@@ -499,6 +499,9 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne
decryptAndVerify(new Intent());
} else if (extra.getString("Operation").equals("ENCRYPT")) {
setContentView(R.layout.encrypt_layout);
+ Typeface monoTypeface = Typeface.createFromAsset(getAssets(), "fonts/sourcecodepro.ttf");
+ ((EditText) findViewById(R.id.crypto_password_edit)).setTypeface(monoTypeface);
+ ((EditText) findViewById(R.id.crypto_extra_edit)).setTypeface(monoTypeface);
String cat = extra.getString("FILE_PATH");
cat = cat.replace(PasswordRepository.getWorkTree().getAbsolutePath(), "");
cat = cat + "/";