Private Label1 as Label
Label1.Initialize("Label1")
Dim B4XLabel1 as B4XView = Label1
Private B4XLabel1 as B4XLabel
B4XLabel1.Initialize(Me,"B4XLabel1")
No. You can directly change the views types to B4XView.I have to create native views and then declare B4XView variables and assign native views.
Sub Globals
Private EditText1 As B4XView
Private Label1 As B4XView
Private ScrollView1 As B4XView
End Sub
I did not know this, only then the question of events and design would be missingNo. You can directly change the views types to B4XView.
B4X:Sub Globals Private EditText1 As B4XView Private Label1 As B4XView Private ScrollView1 As B4XView End Sub
In the future you will be able to generate B4XView directly from the designer. However even without it, it is very simple to switch to B4XView.
See step #2 in the tutorial: https://www.b4x.com/android/forum/threads/b4x-xui-cross-platform-native-ui-library.84359/#content
What I want to get is thisNo. You can directly change the views types to B4XView.
B4X:Sub Globals Private EditText1 As B4XView Private Label1 As B4XView Private ScrollView1 As B4XView End Sub
In the future you will be able to generate B4XView directly from the designer. However even without it, it is very simple to switch to B4XView.
See step #2 in the tutorial: https://www.b4x.com/android/forum/threads/b4x-xui-cross-platform-native-ui-library.84359/#content
Dim Label1 as B4XLabel
Dim EditText1 as B4XEditText
Label1.Initialize(me,"Label1")
EditText1.Initialize(me,"EditText1")
Sub Label1_Click
End Sub
Sub Label1_LongClick
End Sub
Sub Label1_DoubleClick
End Sub
Sub Label1_Touch(action as int, Coordinate as Tcoordinate)
End Sub
Sub EditText1_TextChanged(Old as String, New as String)
End Sub
To avoid confusion you can already build the layout with the designer. You just need to change the generated line from:"In the future you will be able to generate B4XView directly from the designer."
Private EditText1 As EditText
Private EditText1 As B4XView
Don't be too sure that a single designer will be an improvement. It sounds nice and can be nice in small examples. However a desktop app shouldn't look like a mobile app, and there are also expected differences between Android and iOS apps."Tomorrow" we will have a single Designer, I'm pretty sure.
Many of the events are already the same and more events will be added as needed. For example Button Click event was added to B4J (instead of Action) and Touch event will be added in the next version to B4J Panes.Now this is not possible with just the XUI library.
Thanks for the explanation and I agree that it does not have to replace the native views but as I wrote above the purpose is to make code writing on the different platforms uniform.Many of the events are already the same and more events will be added as needed. For example Button Click event was added to B4J (instead of Action) and Touch event will be added in the next version to B4J Panes.
As I wrote in the tutorial about XUI, it doesn't try to replace the native views. It completes them. It is very simple to switch back and forth between B4XView and the native views.
There is nothing bad with using conditional compilation as long as the main logic can be shared. The upside is that you are not limited to the least common denominator features.
It is already possible now...I am pleased to know that in the future there will be the possibility to design the B4X Views
There is one bad thing ("please, open a new thread in the Wish forum"There is nothing bad with using conditional compilation
View.TextColor = Color
Excuse me I understood another thing, thanks for all the explanations.It is already possible now...
Non te sposa', damme rettaI will marry to another direction
You had to give me this advice 21 years ago, today is the 21st anniversaryDo not get married, listen to me
No, it was good; and I (a perfect English man) am saying this.My English is very bad
I hope it was clear, after my second post about that image, that I was just talking about the not nice "look" of the code when you use stamentes like "#IF B4J"... (formatting).The image in post#12 from LucasMs comes from the xChart Class.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?