request input focus in VerifyActivity
This commit is contained in:
parent
49d0558da1
commit
87e9b8037e
|
@ -246,6 +246,8 @@ public class VerifyActivity extends XmppActivity implements ClipboardManager.OnP
|
|||
public void onResume() {
|
||||
super.onResume();
|
||||
if (pinEntryWrapper.isEmpty()) {
|
||||
//starting with Android P we need input focus
|
||||
pinEntryWrapper.requestFocus();
|
||||
pastePinFromClipboard();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
public class PinEntryWrapper {
|
||||
|
||||
private static Pattern PIN_STRING_PATTERN = Pattern.compile("^[0-9]{6}$");
|
||||
private static final Pattern PIN_STRING_PATTERN = Pattern.compile("^[0-9]{6}$");
|
||||
|
||||
private final List<EditText> digits = new ArrayList<>();
|
||||
|
||||
|
@ -152,4 +152,8 @@ public class PinEntryWrapper {
|
|||
digits.get(i).getText().clear();
|
||||
}
|
||||
}
|
||||
|
||||
public void requestFocus() {
|
||||
digits.get(0).requestFocus();
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue