B4i Library [customview] Numpad

Discussion in 'iOS Libraries' started by Erel, Mar 2, 2016.

  1. Erel

    Erel Administrator Staff Member Licensed User

    upload_2016-3-2_17-14-39.png

    A custom view made of text field (FloatLabeledTextField) and a small numpad that appears when the user clicks on the field.

    Similar to the B4A numpad customview: https://www.b4x.com/android/forum/threads/customview-numpad.64191/#content

    It depends on iUI8 (v1.20+) library. You need to add #MinVersion: 8 to your project.
    The customview is made of the Numpad class and Numpad.bil layout file.
     

    Attached Files:

    luke2012, Taha, paulgr and 5 others like this.
  2. jai

    jai Member Licensed User

    How can the size of buttons and of Numpad be modified programaticallY?
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    You will need to access slidingPanel child views and change their sizes.
     
  4. jai

    jai Member Licensed User

    Thanks Erel.

    Is it possible to show a cursor in the numpad view?
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    The problem is that the text field needs to be focused for the cursor to appear. The standard keyboard will appear if the text field is focused.
     
  6. jai

    jai Member Licensed User

    I tried to put a transparent Numpad view over a TextField and request focus on the TextField when Numpad view is clicked. The Numpad keypad shows up fine but no cursor shows up in the TextField.

    All I need is a numeric keypad with numbers and a minus (-) and Back keys. None of the standard numeric and number keypads provides this key. The Customview Numpad seemed ideal after changing the decimal key to a minus key. But without a cursor it is impractical. A blinking cursor is expected by the user to relate an open keypad with a view especially when there are multiple views on the screen.

    Can you suggest any other approach or alternative?
     
  7. JanPRO

    JanPRO Well-Known Member Licensed User

    You can create a custom keyboard as explained here.

    Jan
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    The border of the selected field becomes thicker. You can make it more prominent.
     
  9. jai

    jai Member Licensed User

    I have an established Xcode app with lots of users which includes a custom numeric pad with just the needed keys and a cursor. I am working on replacing this app with a B4i version. It won’t fly if the keypad is not as good as in the Xcode version.

    Initial test reviews of the Numpad versions with darker border, light color background, font colors etc. have not been positive in comparison. Still exploring ways to replicate it in B4i.
     
  10. jai

    jai Member Licensed User

    That seems to be the way to go. Thanks Jan!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice