1. Check out our app, Forums for Android! Download and leave feedback here!

To popup Numeric Keypad instead of Default Keypad | HTML code

Discussion in 'Application Development' started by shibdutta, Apr 18, 2010.

  1. shibdutta

    shibdutta New Member
    Thread Starter
    5

    Apr 18, 2010
    3
    0
    5
    Hi

    I have an HTML/JSP page which is supposed to run on Android phone.
    Theres an Amount field, clicking on should pop up the Numeric Keypad
    instead of Default keypad.


    I am not able to find the code(HTML code) which should by-default bring the
    numeric keypad.

    I tried
    <input android:inputType="phone" name="amount" value="1.00"
    maxlength="9" class="formField"/>

    it does not work..

    please help
     

    Advertisement

  2. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    Welcome to the forum! :D

    I presume you mean XML and not HTML? It's not very difficult.

    Androidblogger describes that:
    Also from Lost Droid:
     
  3. shibdutta

    shibdutta New Member
    Thread Starter
    5

    Apr 18, 2010
    3
    0
    5
    Thank you for your reply.

    actually i meant HTML. So I have a webpage that has an Amount field in it. What i am looking for is that, when a user clicks on the text box, the numeric keypad should come up instead of default keypad.

    I think your solution is for Android Application not for Web Pages which will be viewed on an Andriod Browser.


    Regards
    Shib
     
  4. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    Oh I see, I misunderstood you then. I don't think there's any way to specify what you're looking for. :(

    I mean, you can apply (script-based) data-entry limitations to your web page, but I don't think you can have the web page tell the client what kind of keyboard layout should be used. I'm sure CSS can't help you there, and I doubt if even HTML5 has a hook for that (and even if it did, I don't think the Android browser would be able to handle it).

    The web is too old to know about virtual keyboards! :rolleyes:
     
  5. shibdutta

    shibdutta New Member
    Thread Starter
    5

    Apr 18, 2010
    3
    0
    5
    ya, Web is not yet smart enough. :)

    But i have done similar kind of thing for iPhone browser, by changing the Type of the field to type="number" (instead of "text"). So just by changing the Type of the TAG iPhone browser is able to recognise that it needs to display the Numeric keypad.

    I was looking for something similar for Android :thinking:. i believe Android is smart enough :eek:

    Regards
    Shib
     
  6. Trixor

    Trixor New Member
    5

    Apr 19, 2010
    1
    0
    5
    I am looking for a solution for this challenge as well. Was able to do this for iPhone as mentioned above, but can't find anything on how to do this for Android.

    Thanks for your help!
     
  7. KlaymenDK

    KlaymenDK Well-Known Member
    143

    May 29, 2009
    1,217
    130
    143
    Denmark
    I believe you are being overly optimistic. :D :rolleyes: :eek:

    Hey, try some other Android browsers: Dolphin, Opera, Firefox... :thinking:
     

Share This Page

Loading...