B4J Question Recent UI differences

B4JExplorer

Active Member
Licensed User
Longtime User
Hi,

I'm updating an old project, but some of the UI objects have changed. Is there a link or a thread that explains the differences, and specific things we need to change?

Now, the UI empty Project generator gives us this:

Private xui As XUI
Private Button1 As B4XView


, and the earlier events were javafx based.

Should I just do a total rewrite, or import the code from the earlier version?
 

MicroDrie

Well-Known Member
Licensed User
and the earlier events were javafx based.

In my experience, very "old" code sometimes contains one or more functions of old legacy code. You will get an error message with which you can find the solution with a search in the forum. In addition, you can replace javafx components with the new XUI version so that your B4J code can also work in B4A. With the option generate members in the designer you can add the necessary code to your old project.
 
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
Thanks mcqueccu/MicroDrie/aeric,


"you can replace javafx components with the new XUI version so that your B4J code"



Ok, I'm not familiar with XUI, except that I can see it's automatically part of a new UI project now. Is there a thread that talks about the differences, and a general approach to moving a legacy B4J project over?

It sounds like I should just start from scratch, learn about XUI, and gradually move all the functionality over to the new GUI.


"You have to redesign the Layout file. B4J uses its designer"

I was using the B4J Designer, in the legacy project. Although I have some variables defined as a JFX type, they are only used to access the clipboard.

I guess I'm asking for a shortcut, some kind of "Import older designer into the new XUI style", but there's no such animal.


Ok, thanks everyone. I'll start from scratch.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Are you referring to legacy XML layout? The menu to open the legacy designer has been removed since many version updates. Using the new designer to create bjl layout is more simpler now.

JFX is not deprecated and still being use in B4J for many reasons. You can mix JFX and XUI. Both are optional and can work together in the same project.

Using XUI library enables you to develop cross platform apps in B4X-styled, i.e the same code and views are shared and work the same across B4A, B4i and B4J.
Together with another library, XUI Views, you can use views that common between these platforms. Back to the old days, views from these platforms were having different properties and behavior.

For example:
B4X:
Private Label1 As B4XView
But this is still working:
B4X:
Private Label1 As Label

Check: https://www.b4x.com/android/forum/threads/b4x-xui-cross-platform-native-ui-library.84359/
 
Upvote 0

B4JExplorer

Active Member
Licensed User
Longtime User
No, not that far back. The extension of the files produced by the designer, was .bjl.

So the main advantage of XUI, is cross-platform? Ok, I don't need it ; this project is intended strictly for Windows.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
No, not that far back. The extension of the files produced by the designer, was .bjl.

So the main advantage of XUI, is cross-platform? Ok, I don't need it ; this project is intended strictly for Windows.
My understanding is XUI is not only for cross platform, it is UI for B4X.
There are many powerful views created based on this library. Most examples in this forum is cross platform.
 
Upvote 0
Top