iOS Question [Solved] iPhone number pad has no DONE button

Lori Scott

Member
Licensed User
I developed an app using an iPad for testing. It is now released "Safeguard Cartridge Selector" and works fine on an iPad (as well as the Android version). On an iPhone, the number pad for entering input to textfields has no DONE button. A user who tried it on an iPhone 7 with iOS 12.1.2(16C101) can get functions to work, until he taps in a textfield to enter input. At that point he can enter numbers, and move to other textfields to enter numbers, but cannot then close the number pad or tap to move focus out of the textfields. The textfields are set up to enter numbers only (although iPad does not offer the number-only keypad) so the iPhone puts up the number-only keypad - just with no way to close the keypad. Is the solution to use the full keypad? Or is there a way to close the number keypad on the iPhone after entering input? If I use the decimal keypad, would that make a column for the backspace and DONE along with the decimal point?
 

Lori Scott

Member
Licensed User
A good solution is to use B4XFloatTextField. It adds a check mark in order to solve this issue: https://www.b4x.com/android/forum/t...ss-platform-views-and-dialogs.100836/#content

I'm trying to follow this suggestion.

I've downloaded and extracted the XUI Views Example file.

I've downloaded the XUI Views.b4xlib file. I'm not sure where to put the XUI Views.b4xlib file. I put it in my folder for extra B4i Libraries. Although it doesn't say it's a .zip file, I tried extracting it. Couldn't see any difference with or without extracting.

I opened the XUI Views Example.b4i file. There are error warnings about missing a library reference but I don't see any Library available such as 'iXUIViews'. I can see the B4xFloatTextLFields already present in the designer, but if I try to add one, there are are no custom views such as this one available.

Please tell me how to use the .b4xlib file.
 
Upvote 0

Lori Scott

Member
Licensed User
I had better luck saving the Xui Views.b4xlib file into the regular library file at
C:\Program Files (x86)\Anywhere Software\B4i\Libraries
Now the iXUI Views library is available and the sample file library warnings are gone.
 
Upvote 0

Lori Scott

Member
Licensed User
Eventually I was able to use the XUI View.b4xlib Library from the AdditionalLibraries folder as well (when I used the right path).
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I developed an app using an iPad for testing. It is now released "Safeguard Cartridge Selector" and works fine on an iPad (as well as the Android version). On an iPhone, the number pad for entering input to textfields has no DONE button. A user who tried it on an iPhone 7 with iOS 12.1.2(16C101) can get functions to work, until he taps in a textfield to enter input. At that point he can enter numbers, and move to other textfields to enter numbers, but cannot then close the number pad or tap to move focus out of the textfields. The textfields are set up to enter numbers only (although iPad does not offer the number-only keypad) so the iPhone puts up the number-only keypad - just with no way to close the keypad. Is the solution to use the full keypad? Or is there a way to close the number keypad on the iPhone after entering input? If I use the decimal keypad, would that make a column for the backspace and DONE along with the decimal point?

The common way to do it in Xcode (using Swift or Obj-C) is to add a toolbar to the keypad using an input accessory view attached to your text view(s) - however I'm not sure if/how it can be done in B4i.

https://appendto.com/2018/10/how-to-add-a-toolbar-above-the-ios-keyboard-swift/

- Colin.
 
Upvote 0
Top