[XUI] B4XView and B4XLabel, B4XPanel, B4XEditText

Erel

B4X founder
Staff member
Licensed User
Longtime User
For these properties, the user enters native colors, like for any other view / node, which means Color as Int in B4A and B4i and Color As Paint for B4J.
Two points about it:
1. For colors set in the designer you can use xui.PaintOrColorToColor to get the color value from the props Map. It will work in all three platforms.

2. For colors set in the code I recommend to let the user (the developer) use the XUI colors instead of the jFX colors:
B4X:
lbl.TextColor = xui.COLOR_RED 'or 0xFFFF0000
I don't see any advantage for the jFX colors. Working with ints is actually simpler and it allows you to use the same code in all three platforms.
 

Star-Dust

Expert
Licensed User
Longtime User
You are off topic, please return to the main topic :p
 

ilan

Expert
Licensed User
Longtime User
I personally dont use XUI. In my opinion each platform should have his own views and it would be wrong to try to have same views for all platforms.

People that are used to ios will not like to see an ios app with android characteristics and the same for android users.

I understand the xui is trying to do that (use native views for each platform) but i think it will reach a point where u will make compromise and loose the os filling and make them too similar.

I would preffer erel concitrate on adding more native properties to the views instead of using native object to access them.
 

Star-Dust

Expert
Licensed User
Longtime User
I personally dont use XUI. In my opinion each platform should have his own views and it would be wrong to try to have same views for all platforms.

People that are used to ios will not like to see an ios app with android characteristics and the same for android users.

I understand the xui is trying to do that (use native views for each platform) but i think it will reach a point where u will make compromise and loose the os filling and make them too similar.
In mine App, I do not even use the XUI , also because I develop only small personal things with B4J but I generally use VB.Net. For me it is only an academic exercise.

But I like the idea a lot, as I said before I'm fascinated by Delphi that the same code compiles it for Windows Android and iOS, with the possibility to access specific features of the system if you want to compile only for a specific system . Just like Unity does for many platforms.

So I have something uniform I like, but I agree with you that if it is not necessary to go on specific language
 

Star-Dust

Expert
Licensed User
Longtime User
I would add that Erel has greatly enhanced the XUI and some things are better done with it.

Just think of the snapshot or other things that you do in B4A would be very complicated and with XUI you give it with a command.
Erel pushes in this direction and empowers XUI, better learn how to use them
 

ilan

Expert
Licensed User
Longtime User
In mine App, I do not even use the XUI , also because I develop only small personal things with B4J but I generally use VB.Net. For me it is only an academic exercise.

But I like the idea a lot, as I said before I'm fascinated by Delphi that the same code compiles it for Windows Android and iOS, with the possibility to access specific features of the system if you want to compile only for a specific system . Just like Unity does for many platforms.

So I have something uniform I like, but I agree with you that if it is not necessary to go on specific language

It make sense to have the same app if it is a game so unity is a good choice for that or constract and mich more game makers but applications should have a uniqe UI that u are used in his os. So in my opinion an ios app should look like an ios app and not like android.

I am not talking about taste so what we as devs like we always need to think of the users and how to give them the filling they would like to have when they use our apps.
 

LucaMs

Expert
Licensed User
Longtime User
I don't know the iOS world, fortunately :p, but I'm pretty sure that you must use buttons, labels, edittexts... in a iOS app;
In my opinion each platform should have his own views
The second point is important. XUI types provide a different "view" or a different wrapper above the same native objects. They do not replace the native types.
That "view" does not mean "a standard GUI view", means "point of view".
Again, I have no iOS devices but I'm almost sure that the look of iOS views (B4i views) does not change.

Also, things like these:
https://www.b4x.com/android/forum/t...ingindicator-loading-indicator.92243/#content
should have different look on iOS?
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
In a next future, I will develop a Custom View (I already did it; I will do it better... I hope :p) similar to this one I drawed right now using a simple graphic tool (quickly):

upload_2018-5-4_14-19-49.png


It will be my cvPlayer.

If I will use XUI, in my b4a client, in a next future I could use the same CV when (and if) I will develop the iOS version of my client.


[I got tired of the usual "Hello World" :D]
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I personally dont use XUI. In my opinion each platform should have his own views and it would be wrong to try to have same views for all platforms.

People that are used to ios will not like to see an ios app with android characteristics and the same for android users.

I understand the xui is trying to do that (use native views for each platform) but i think it will reach a point where u will make compromise and loose the os filling and make them too similar.

I would preffer erel concitrate on adding more native properties to the views instead of using native object to access them.
What you wrote is wrong. Try to use it and you will see. XUI just provides a different API to the exact same native views.
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
I resumed the project.
I will add the following to the views already indicated in the title:

RadioButton
Checkbox
Button
ImageView
ProgressBar
combobox
Calendar
SeekBar
TableView (?)

Maybe I will add some 3D effects

upload_2018-8-11_21-28-17.png
 
Last edited:
D

Deleted member 103

Guest
In my opinion, the way with the XUI framework is wrong.
I expect a B4x platform to do it all with the IDE.
If I have a label in B4a then it should have the same property in B4i as if you were using the XUI framework, just so it makes sense to me.
 

Star-Dust

Expert
Licensed User
Longtime User
In my opinion, the way with the XUI framework is wrong.
I expect a B4x platform to do it all with the IDE.
If I have a label in B4a then it should have the same property in B4i as if you were using the XUI framework, just so it makes sense to me.
I'm trying to do just that.
Custom XUI views that have the same properties on all platforms
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
In my opinion, the way with the XUI framework is wrong.
The more I use the XUI framework, the more I'm convinced that the design behind it is very good. It exposes all the methods common to the three platforms, in a convenient way, and it allows you to easily access the platform specific features.


Custom XUI views that have the same properties on all platforms
Creating custom XUI views that wrap the native views will not add anything useful. It will just limit the developer and make things more complicated.
It only makes sense to add custom views when the native view is not supported by XUI (it is not supported because the implementations are too distant). For example: B4XCombobox - https://www.b4x.com/android/forum/threads/89695/#content

It is very important to understand that you should manually convert the views types in the globals sub to B4XView.

I do think that the visual designer should be improved and make it easier to copy layouts between the platforms. This is planned for the future.
 

Star-Dust

Expert
Licensed User
Longtime User
Yes, we talked about it 3 months ago on this thread.
But it may take too long to get these changes in design.

In the meantime, I would like to add personalized views, both those that exist natively but also those that do not exist.

Obviously some views do not make sense to translate into all platforms like the comboBox
 

Star-Dust

Expert
Licensed User
Longtime User
I'm happy to announce the publication of my new B4XView library. Can find it here
 
Top