mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 13:27:46 +00:00
Set correct monospace font, fix more textview/edittext confusion
This commit is contained in:
parent
b5faaed496
commit
8c6142bca6
@ -9,6 +9,7 @@ import android.content.ClipboardManager;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
|
import android.graphics.Typeface;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceManager;
|
import android.preference.PreferenceManager;
|
||||||
@ -54,6 +55,9 @@ public class SshKeyGen extends AppCompatActivity {
|
|||||||
android.R.layout.simple_spinner_dropdown_item, lengths);
|
android.R.layout.simple_spinner_dropdown_item, lengths);
|
||||||
spinner.setAdapter(adapter);
|
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 checkbox = (CheckBox) v.findViewById(R.id.show_passphrase);
|
||||||
checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
checkbox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||||
@Override
|
@Override
|
||||||
@ -159,11 +163,11 @@ public class SshKeyGen extends AppCompatActivity {
|
|||||||
Spinner spinner = (Spinner) findViewById(R.id.length);
|
Spinner spinner = (Spinner) findViewById(R.id.length);
|
||||||
int length = (Integer) spinner.getSelectedItem();
|
int length = (Integer) spinner.getSelectedItem();
|
||||||
|
|
||||||
TextView textView = (TextView) findViewById(R.id.passphrase);
|
EditText editText = (EditText) findViewById(R.id.passphrase);
|
||||||
String passphrase = textView.getText().toString();
|
String passphrase = editText.getText().toString();
|
||||||
|
|
||||||
textView = (TextView) findViewById(R.id.comment);
|
editText = (EditText) findViewById(R.id.comment);
|
||||||
String comment = textView.getText().toString();
|
String comment = editText.getText().toString();
|
||||||
|
|
||||||
JSch jsch = new JSch();
|
JSch jsch = new JSch();
|
||||||
try {
|
try {
|
||||||
|
@ -36,8 +36,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/ssh_keygen_passphrase"
|
android:hint="@string/ssh_keygen_passphrase"
|
||||||
android:inputType="textPassword"
|
android:inputType="textPassword"/>
|
||||||
android:fontFamily="monospace"/>
|
|
||||||
</android.support.design.widget.TextInputLayout>
|
</android.support.design.widget.TextInputLayout>
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
|
Loading…
x
Reference in New Issue
Block a user