P philly_tee Member Licensed User Longtime User Sep 1, 2023 #1 Hi - I have built an Android B4XPages app. I am now looking to build the equivalent for IOS. In B4XMainPage I have Android specific controls as part of the UI: Code: Copy Sub Class_Globals Private edBrigadeNumber As EditText Private edSecret As EditText ... End Sub As B4i has TextFields instead of EditTexts, I get a syntax error in B4i. What is best practice here? As B4XMainPage is shared across the three platforms, a change in one IDE will result in errors in the others. Many thanks Philip
Hi - I have built an Android B4XPages app. I am now looking to build the equivalent for IOS. In B4XMainPage I have Android specific controls as part of the UI: Code: Copy Sub Class_Globals Private edBrigadeNumber As EditText Private edSecret As EditText ... End Sub As B4i has TextFields instead of EditTexts, I get a syntax error in B4i. What is best practice here? As B4XMainPage is shared across the three platforms, a change in one IDE will result in errors in the others. Many thanks Philip
jahswant Well-Known Member Licensed User Longtime User Sep 1, 2023 #2 Use As B4xview. Upvote 0 Solution
aeric Expert Licensed User Longtime User Sep 1, 2023 #3 You can also use: B4X: Copy #If B4i Dim txt1 As TextField #Else if B4A Dim txt1 As EditText #End if Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Sep 3, 2023 #4 philly_tee said: In B4XMainPage I have Android specific controls as part of the UI: Click to expand... Not good. Quickly change their declaration to B4XView or better use B4XFloatTextField from XUI Views instead. Upvote 0
philly_tee said: In B4XMainPage I have Android specific controls as part of the UI: Click to expand... Not good. Quickly change their declaration to B4XView or better use B4XFloatTextField from XUI Views instead.
P philly_tee Member Licensed User Longtime User Sep 3, 2023 #5 Thanks all; appreciate your advice. I have changed to B4XView. I'll also look into XUI Views. Upvote 0