From 699e845e6dc25aa9da14c6ec9565ba5a006a7e00 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 12 Aug 2017 22:17:24 +0200 Subject: [PATCH] default input type to numbers on captcha dialog --- .../java/eu/siacs/conversations/ui/EditAccountActivity.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java index 481039156..96f00957c 100644 --- a/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/EditAccountActivity.java @@ -16,6 +16,7 @@ import android.security.KeyChain; import android.security.KeyChainAliasCallback; import android.support.v4.content.ContextCompat; import android.text.Editable; +import android.text.InputType; import android.text.TextWatcher; import android.view.Menu; import android.view.MenuItem; @@ -1159,6 +1160,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat final View view = getLayoutInflater().inflate(R.layout.captcha, null); final ImageView imageView = (ImageView) view.findViewById(R.id.captcha); final EditText input = (EditText) view.findViewById(R.id.input); + input.setInputType(InputType.TYPE_CLASS_NUMBER); imageView.setImageBitmap(captcha); builder.setTitle(getString(R.string.captcha_required)); @@ -1199,6 +1201,7 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat }); mCaptchaDialog = builder.create(); mCaptchaDialog.show(); + input.requestFocus(); } }); }