File tree 2 files changed +8
-3
lines changed
app/src/main/java/com/surcumference/fingerprint/view
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,7 @@ private void initView(Context context) {
90
90
91
91
withPositiveButtonText (Lang .getString (R .id .ok ));
92
92
withOnPositiveButtonClickListener ((dialog , which ) -> {
93
- mInputView .clearFocus ();
94
- InputMethodManager imm = (InputMethodManager ) getContext ().getSystemService (Context .INPUT_METHOD_SERVICE );
95
- imm .hideSoftInputFromWindow (mInputView .getWindowToken (), 0 );
93
+ hideInputMethod ();
96
94
post (() -> {
97
95
dialog .dismiss ();
98
96
});
@@ -123,6 +121,12 @@ protected void onAttachedToWindow() {
123
121
imm .showSoftInput (mInputView , InputMethodManager .SHOW_IMPLICIT );
124
122
}, 200 );
125
123
}
124
+ public void hideInputMethod () {
125
+ mInputView .clearFocus ();
126
+ InputMethodManager imm = (InputMethodManager ) getContext ().getSystemService (Context .INPUT_METHOD_SERVICE );
127
+ imm .hideSoftInputFromWindow (mInputView .getWindowToken (), 0 );
128
+ }
129
+
126
130
127
131
@ Override
128
132
public AlertDialog showInDialog () {
Original file line number Diff line number Diff line change @@ -187,6 +187,7 @@ private void showUpdatePasswordViewDialog() {
187
187
passwordInputView .setDefaultText (DEFAULT_HIDDEN_PASS );
188
188
}
189
189
passwordInputView .withOnPositiveButtonClickListener ((dialog , which ) -> {
190
+ passwordInputView .hideInputMethod ();
190
191
String inputText = passwordInputView .getInput ();
191
192
if (TextUtils .isEmpty (inputText )) {
192
193
config .setPasswordEncrypted ("" );
You can’t perform that action at this time.
0 commit comments