diff options
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java | 12 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_ssh_keygen.xml | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java index c7f214f3..000e08e7 100644 --- a/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java +++ b/app/src/main/java/com/zeapo/pwdstore/SshKeyGen.java @@ -9,6 +9,7 @@ import android.content.ClipboardManager; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; +import android.graphics.Typeface; import android.os.AsyncTask; import android.os.Bundle; import android.preference.PreferenceManager; @@ -54,6 +55,9 @@ public class SshKeyGen extends AppCompatActivity { android.R.layout.simple_spinner_dropdown_item, lengths); spinner.setAdapter(adapter); + Typeface monoTypeface = Typeface.createFromAsset(getActivity().getAssets(), "fonts/sourcecodepro.ttf"); + ((EditText) v.findViewById(R.id.passphrase)).setTypeface(monoTypeface); + CheckBox checkbox = (CheckBox) v.findViewById(R.id.show_passphrase); checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override @@ -159,11 +163,11 @@ public class SshKeyGen extends AppCompatActivity { Spinner spinner = (Spinner) findViewById(R.id.length); int length = (Integer) spinner.getSelectedItem(); - TextView textView = (TextView) findViewById(R.id.passphrase); - String passphrase = textView.getText().toString(); + EditText editText = (EditText) findViewById(R.id.passphrase); + String passphrase = editText.getText().toString(); - textView = (TextView) findViewById(R.id.comment); - String comment = textView.getText().toString(); + editText = (EditText) findViewById(R.id.comment); + String comment = editText.getText().toString(); JSch jsch = new JSch(); try { diff --git a/app/src/main/res/layout/fragment_ssh_keygen.xml b/app/src/main/res/layout/fragment_ssh_keygen.xml index 27fe068a..321e77d0 100644 --- a/app/src/main/res/layout/fragment_ssh_keygen.xml +++ b/app/src/main/res/layout/fragment_ssh_keygen.xml @@ -36,8 +36,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/ssh_keygen_passphrase" - android:inputType="textPassword" - android:fontFamily="monospace"/> + android:inputType="textPassword"/> </android.support.design.widget.TextInputLayout> <CheckBox |