B4J Question Help with XUI

tsteward

Well-Known Member
Licensed User
Longtime User
Hoping someone has the time to look at this little program that I have started to write my first XUI and show me how I should be doing it.
Just trying to get my head around how to write XUI apps.
 

Attachments

  • LearningXUI.zip
    141.9 KB · Views: 110

tsteward

Well-Known Member
Licensed User
Longtime User
There is no such thing as XUI app. XUI is a library that you can use in any of your projects.

What are the goals of this app? Do you want to share the modules with other non-B4J projects?
Sorry poor terminology, I realise there is no XUI app.
This is the begining of a re-write of a large program I have written in B4A which has become very cumbersome from poor code managment by me.

I want to write my app so I can create B4J, B4A & B4I apps
The attached code is the B4J start of my project. Hoping you can show me how to prepare it so I can more easily prepare the code for the next step of creating the B4A version. Rather than re-writing everything.

I am hoping this will help me to understand what to put into Classes etc.

Hope that make sence.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I want to write my app so I can create B4J, B4A & B4I apps
That's a good goal. The way to start is by creating the three projects and linking the modules that should be shared. This way you will immediately see the problems.

For example the About and Tools classes use API very specific to B4J. Check the new B4XDialog from 'XUI Views' for an alternative cross platform dialog solution.

Some things that I see:
File.DirApp is B4J only and should be considered a read-only folder. Don't use it at all.
Use DBUtils which is cross platform and it will take care of the differences.
Also check XUI.DefaultFolder.

The usage of anchors is incorrect. It is important to implement the layout correctly with the visual designer. This will save you a lot of platform specific code.

I recommend you to watch the following videos: https://www.b4x.com/etp.html

Visual Designer
XUI - Cross platform UI
XUI Cross Platform Example
 
Upvote 0
Top