9 Replies Latest reply on Jan 25, 2012 12:35 AM by Luis Pedro Ferreira

    iOS Numeric keypad

    Luis Pedro Ferreira Level 1

      Hey guys!

       

      I've been working with Flex / Flash Builder since a wile and I'm now starting to do some stuff with the new mobile platform.

      I was wondering how to set an InputTextField to show the iPhone numeric keypad instead of the normal alphabetic keyboard.

       

      There is a lot of things still hanging in my mind about Flash Builder and iOS such has keyboards, auto correction off, Data Pickers, Action Menus, Alerts, etc...

       

      Where can I find documentation regarding all this things??

       

      Luis Pedro Ferreira

        • 1. Re: iOS Numeric keypad
          Ray Rogers

          Luis - did you ever find out where the documentation is on the keypad? I have an application that uses numbers only in a text input. I've restricted the input to numbers but would prefer a numeric keypad or at least set the regular keyboard to the Symbols option.

           

          Thanks

          Ray

          • 2. Re: iOS Numeric keypad
            draincover

            Hi

             

            restrict = "0-9"

             

            or

             

            restrict = ".0-9"

             

            on a textInput

             

            is the best I can find for this but it still will allow 0.9.5.6 if they want to enter that so you still have to error handle it.

             

            Nige

            • 3. Re: iOS Numeric keypad
              Ray Rogers Level 1

              Thanks for this - yes I got the app to restrict itself to numbers only and that's a good start. I'm hoping to get more info about the keypad. I'll update this thread if I can find out more.

               

              Ray

              • 4. Re: iOS Numeric keypad
                Rangora Level 3

                Did you try it on a device? There is a known bug with the "restrict" on iOS device.

                 

                I think it is possible in AIR 3.0. If you want something similar in AIR 2.7, you have to create your own "keypad" widget. It's not very complex, but it takes time...

                • 5. Re: iOS Numeric keypad
                  draincover Level 1

                  Drats, thats a pain. Is there a link to the solution? I'm currently battling with soap being very slow as its a real bind to compress, well seems impossible with a soap service added by adding data source with all the code compliled for you by flash builder.

                  • 6. Re: iOS Numeric keypad
                    Ray Rogers Level 1

                    I am testing my routine on a Samsung Galaxy S and have no problems with the restrict feature. I haven't published it yet and it will be a very small target audience so may not find problems for some time. So as of now I am working under the assumption that all is okay with the restrict attribute. But as usual - time will tell. Thanks for the input on this - I will be watchful for it.

                     

                    The numeric keypad would be a nice option though and that seems to be the challenge right now. I have an illustration of a CSS solution but couldn't find any code to support it. Will keep looking.

                     

                    Cheers all

                    Ray

                    • 7. Re: iOS Numeric keypad
                      Rangora Level 3

                      As I said, there is a bug on IOS device... Everything is fine on Android. On iOS, the restrict does nothing (you can type anything).

                      • 8. Re: iOS Numeric keypad
                        Ray Rogers Level 1

                        Apologies for not reading thoroughly enough...... I think I've got it now

                         

                        Ray

                        • 9. Re: iOS Numeric keypad
                          Luis Pedro Ferreira Level 1

                          Looks like the next version of Flash Builder (4.6) will bring something new regarding this post.

                          However, it yould be nice to have an option to show or hide the decimal point where is normaly located on the bottom left space wich is an empty space.

                          This is possible with objective C from the 4.0 iOS version on the iPhone (I supode on iPad too)