Share My Creation B4A Desktop Preview — preview your compiled app on the desktop

promo(dont delete max) resized.png


Hey everyone,

I made a Windows tool that previews a B4A app on the desktop. It's not a layout-file viewer: it actually compiles your project with B4ABuilder and runs the real activity, then shows a snapshot you can click through.

What it does

Renders the real compiled activity as a preview.
Click views to trigger their actions and navigate.
Inspect the view tree and properties in a sidebar.
Auto-reloads when you edit a layout (.bal) or code file.

What it doesn't do (honest edition)

It's not instant. Layout edits are quick, but code changes need a recompile — several seconds, more on big projects. Definitely not "Flutter-fast".
It does not replicate a real device's behavior exactly.
No scrolling ListView / CustomListView.

And about that video… yeah, I'm sorry. I got a bit excited and the trailer oversold it: "super fast", and all that. The real, boring, honest version is right here above. 😅 Mea culpa.

Setup — no paths to configure
For normal use you don't need to touch the Settings paths at all. Java, the render engine, and the Android resource tools are bundled inside the app folder. B4A is auto-detected from its default install location; the only time you'd set a path is if your B4A lives somewhere non-standard.

Requirements: Windows 10/11 + B4A installed (it uses B4ABuilder).

Google Drive 1.02

If you find this useful and want to support continued development, donations are always appreciated — but totally optional. Bug reports and feedback are welcome too — thanks for checking it out!

 
Last edited:

Mashiane

Expert
Licensed User
Longtime User
Well well well...

1786755068105.png
1786755200635.png


For my code based UI designs (no bal), this makes a lot of sense.

Questions

Q1. Can one have an option to change the variant? you have 360 by 800 only it seems.
Q2. Can the theme be changed, for example, the app is black, what if Id like a white theme? toggle between the two.
Q3. Im using an i5, so speed is very concerning.
Q4. Assuming that one can move the UI components on the screen, can one nudge them also, e.g. nudge top, left, right, bottom?
Q6. adb has functionality to download a UI as xml e.g. for debugging, can that be possible.
Q7. The right UI (on the right) vs the almost perfect one (on the left). What could be the issue with the rendering?
Q8. Can the docked menu (on the left) be placed on the right by choice? Im right handed so having to navigate all the way is tricky.
 

Maxcfgos

Member
Licensed User
Update version 1.02

Changelog — new in this version:

- Fix: hierarchy tree is now scrollable
- Improve render quality
- Fix bugs
- Git integration / panel

* In folders with 2 .b4a files, delete the Objects/ folder before generating
the preview.

About the preview dependencies

The preview needs 3 Robolectric framework files (~547 MB) that are no longer
bundled with the app because they are too big to ship. On the first preview,
a window will appear asking for your consent and will download them from
Maven Central into your user profile. The download is resumable: if the
connection drops, it continues where it stopped instead of starting over.

If you already have the previous version, you can avoid the download
entirely: those files were included in it, so just copy them from the old
install into the app's folder — assets\preview-host\vendor\robolectric-deps\
and assets\preview-host\vendor\libs\ — and the app will detect them and skip
the download.

If the download keeps failing, the window also offers a manual option: copy
the URLs into your browser, save each file with the exact name shown, place
it in the folder indicated, and click "Check again".
 
Top