2

I'm using a webview to allow users to login. Since the site requires a numeric password, I'd like the webview to pop up the numeric keypad, but also hide the input characters. I know that if you specify an HTML input type = "number" it will pop up the numeric keypad. In addition, if you specify the HTML input type = "password" it will hide the input characters.

However, in this case, I need to do both (ie. pop open the numeric keyboard AND hide the input characters). I know that if I were using a native screen, I could specify an EditText field of type "numeric password", however, I'm using a webview, so I don't believe this is available.

Any suggestions here?

user1243306
  • 21
  • 1
  • 2

1 Answers1

0

You can make it "password type", with hint for user that just numeric passwords will be accepted. When user enter password, you check from code is it numeric, in case it isn't you can show dialog that entered password doesn't satisfies criteria and make user enter valid one.

is it acceptable for your situation?

Ewoks
  • 12,285
  • 8
  • 58
  • 67
  • 1
    Thanks for your response. The problem is that if we make it type="password", the keyboard defaults to the text keyboard, requiring the user to hit the '123' key to switch to a numeric keyboard. I'd like to have it be a numeric keyboard automatically, without the user having to switch it for proper input. Any other ideas? – user1243306 Mar 01 '12 at 19:36
  • yes you are right. It's not so convenient. Let you know if I come up with better idea. – Ewoks Mar 02 '12 at 07:35
  • 1
    I found a css solution that will work for me. It was solved in a previous post at http://stackoverflow.com/questions/8333117/is-there-a-way-to-have-a-masked-numeric-input-field – user1243306 Mar 02 '12 at 15:25