I am finishing up my first B4xPages app and on testing have some questions about keyboard and differences in the B4i version. I have read a lot of posts but they stretch over time and I am never sure if they apply to B4X/B4Xpages or just the the particular compiler. Also let it be known that I am an Android user, and bought an iPhone for the sole purpose of development so I am not really familiar with how things are 'supposed' to work in the iPhone world. Also, I have never tried designing an iPhone app using B4i specific controls (Controls were all copied from Android designer and are all dimmed as B4Xviews.).
So,
1. In B4A the controls are "pushed up" just fine when the keyboard is displayed in the iPhone version this does not happen. Is this a bug? By design? Have I missed something? If this is the way it works what is the recommended way to handle this?
2. It appears that in B4J/B4A the
3. I have a page with several EditTexts/TextFields. In the 'Tab' order they are alternating input types. One is regular ASCII input followed by one set to Phone input followed by EMail, then Phone2. (Android designer Input Type is TEXT/PHONE/TEXT/PHONE. In B4i it is DEFAULT/PHONE_PAD/EMAIL_ADDRESS/PHONE_PAD) Again, works fine in Android I get the little arrow that takes me to the Next field. In B4i I have all the fields set to Return Key = NEXT and the final one set to DONE. In ALL cases NEXT closes the keyboard and the cursor disappears so I have no idea where I am. I have to manually select every field to edit it. AAANDD! The PHONE_PAD keyboard has NO Return/Next/Done button so there is no way to move anywhere anyway which brings me to # 4.
4. On other iPhone apps swiping down from the top of the keyboard closes the keyboard. My B4xPages app does not appear to support that behavior. So there appears to be NO WAY to close the keyboard. Since the last field is PHONE and has no "Return Key". The only way I have found to close the keyboard is to Pick another View that HAS a "Return Key" and then click that. I have another page that has a TextView (A lot of editable text-needs to scroll) rather than a TextField and it has no "Return Key" behavior property that I can find and I have found no default way to close the keyboard. I was able to cobble something together using
5. The TextView appears to require a Double Tap to open the keyboard rather than one tap as with a TextField? Is this normal behavior?Very non-intuitive to have two different ways of getting the Keyboard.
As always, I feel like I have somehow missed an important piece of the puzzle.
As always thanks for any help and ideas.
So,
1. In B4A the controls are "pushed up" just fine when the keyboard is displayed in the iPhone version this does not happen. Is this a bug? By design? Have I missed something? If this is the way it works what is the recommended way to handle this?
2. It appears that in B4J/B4A the
_TextChanged (Old As String, New As String)
event fires when I 'stuff' text in the view in code (a blessing and a curse). In B4i it does not appear to fire when 'stuffing text' in code. Is this a bug or is this the normal behavior? I ask because I have code that I need to run when text changes, but I also don't want it to run twice. So do I need to code it differently for B4i? I will give you and example: The user can select text from one location and it is then copied to another location where they can edit it. The text selected may or may not be too long for the field. If it is too long a warning is given and the text returned to Old. The code HAS to be in the event to handle the user edits and that works fine in B4J/A/i but it appears that for B4i I will have to put the code separately for the copy?3. I have a page with several EditTexts/TextFields. In the 'Tab' order they are alternating input types. One is regular ASCII input followed by one set to Phone input followed by EMail, then Phone2. (Android designer Input Type is TEXT/PHONE/TEXT/PHONE. In B4i it is DEFAULT/PHONE_PAD/EMAIL_ADDRESS/PHONE_PAD) Again, works fine in Android I get the little arrow that takes me to the Next field. In B4i I have all the fields set to Return Key = NEXT and the final one set to DONE. In ALL cases NEXT closes the keyboard and the cursor disappears so I have no idea where I am. I have to manually select every field to edit it. AAANDD! The PHONE_PAD keyboard has NO Return/Next/Done button so there is no way to move anywhere anyway which brings me to # 4.
4. On other iPhone apps swiping down from the top of the keyboard closes the keyboard. My B4xPages app does not appear to support that behavior. So there appears to be NO WAY to close the keyboard. Since the last field is PHONE and has no "Return Key". The only way I have found to close the keyboard is to Pick another View that HAS a "Return Key" and then click that. I have another page that has a TextView (A lot of editable text-needs to scroll) rather than a TextField and it has no "Return Key" behavior property that I can find and I have found no default way to close the keyboard. I was able to cobble something together using
Sub B4XPage_KeyboardStateChanged
and the Sub TextView_Click
event but it is not intuitive.5. The TextView appears to require a Double Tap to open the keyboard rather than one tap as with a TextField? Is this normal behavior?Very non-intuitive to have two different ways of getting the Keyboard.
As always, I feel like I have somehow missed an important piece of the puzzle.
As always thanks for any help and ideas.