Skip to content

Commit c5cb0f5

Browse files
committed
Do not use InputType.TYPE_NULL, instead set the password field as non focusable, non clickable. Props @tonyr59h
1 parent edb3fe1 commit c5cb0f5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎library/res/layout/app_passcode_keyboard.xml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
android:layout_height="wrap_content"
4949
android:layout_marginRight="38dp"
5050
android:hint="@string/passcodelock_hint"
51+
android:focusable="false"
52+
android:clickable="false"
5153
android:maxLength="4"
5254
android:inputType="numberPassword"
5355
android:background="@color/white" />

‎library/src/org/wordpress/passcodelock/AbstractPasscodeKeyboardActivity.java‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import android.support.v4.hardware.fingerprint.FingerprintManagerCompat;
77
import android.support.v4.os.CancellationSignal;
88
import android.text.InputFilter;
9-
import android.text.InputType;
109
import android.text.Spanned;
1110
import android.view.Gravity;
1211
import android.view.View;
@@ -52,8 +51,7 @@ protected void onCreate(Bundle savedInstanceState) {
5251
filters[1] = onlyNumber;
5352

5453
mPinCodeField = (EditText)findViewById(R.id.pin_field);
55-
mPinCodeField.setInputType(InputType.TYPE_NULL);
56-
54+
5755
//setup the keyboard
5856
findViewById(R.id.button0).setOnClickListener(defaultButtonListener);
5957
findViewById(R.id.button1).setOnClickListener(defaultButtonListener);

0 commit comments

Comments
 (0)