Other Basic4android v3.20 BETA is released

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm very happy to release B4A v3.20 BETA :)

This version includes many important improvements:
  • Visual designer
    • Anchors feature - makes it easier to target multiple screen sizes.
    • Copy & paste - work both inside the layout or between different layouts.
    • Undo / redo feature.
    • The views are organized in a tree for easier navigation.
    • AutoScaleAll keyword now works with all variants, not just the "standard" variant.
    • Colors fields can be copied and the colors values can be pasted or directly typed.
    • Designer script find / replace dialog.
    • The grid is saved in the layout file.
    • Landscape / Portrait designer keywords to test the current orientation.
    • UI Cloud threshold reduced to 10 seconds.
  • #AdditionalRes attribute - Makes it possible to wrap Android library projects (projects with resources).
  • Sync button in the Files tab - Syncs the project files with the Files folder.
  • Modules added to the Find Sub / Module tool (Ctrl + E).
  • Tabs order in the IDE is preserved.
  • Modules files that were not modified will not be saved thus preserving the correct time stamp.
  • DateTime.SetTimeZone now accepts a Double instead of Int.
  • Shortcuts: F11 - Restart (rapid debugger), F2 in the designer connects to the device.
  • Bug fixes and other minor improvements.
Notes
  • RerunDesignerScript is now considered a deprecated method. It will continue to run as before. However it doesn't support the new anchors feature and will fail when running in Rapid debug mode.
  • Layout files saved with v3.20 cannot be loaded with previous versions.
Make sure to backup your projects before loading them with the beta version.

Users who are eligible for a free upgrade should receive an email with the download link. Please post any issues in the forum, preferably with the BETA prefix.
 
Last edited:

corwin42

Expert
Licensed User
Longtime User
It will function the same as before. It just won't support the new Anchor features (and rapid debugger).

The reasons are technical.

Note that you can use the standard XML layouts with the XmlLayoutBuilder library if you like.

I will think about using XmlLayoutBuilder library instead. But it was nice to create the layout with the designer.

Some questions about #AdditionalRes keyword.
I think I just have to add a folder here like
B4X:
#AdditionalRes: myres
#AdditionalRes: myres2

with myres and myres2 are folders in my project directory.
Do the files get copied straight to the normal res folder or how is this handled?
Can the keyword be added multiple times?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
The syntax is:
B4X:
#AdditionalRes: <additional res folder> [, additional package]
It can be used multiple times.
The first parameter is the path to the additional res folder that will be added during compilation.
The second parameter is options. It is required when you wrap an Android library project which expects its own R.java file. The package parameter should be the same as the Android library project package.

The files are not copied to the normal res folder. They are packaged directly into the APK.
 
Upvote 0

corwin42

Expert
Licensed User
Longtime User
The syntax is:
B4X:
#AdditionalRes: <additional res folder> [, additional package]
It can be used multiple times.
The first parameter is the path to the additional res folder that will be added during compilation.
The second parameter is options. It is required when you wrap an Android library project which expects its own R.java file. The package parameter should be the same as the Android library project package.

The files are not copied to the normal res folder. They are packaged directly into the APK.

The path has to be the full path? Would be nice to have the possibility to use a relative path to the project folder. Otherwise it is a problem if you move your project to another folder.
 
Upvote 0

leandroavila74

Member
Licensed User
Longtime User
in Version 3.20
the resource anchor is great
the problem is that the "horizontal anchor = both" mode has a bug when you are connected to real hardware and not the emulator.
 
Upvote 0

leandroavila74

Member
Licensed User
Longtime User
Can you provide more information?

yes
I'm using "B4A-Bridge v2.09"
on a host android 4.0.4

creates an activity
add a view (eg EditText or label)

double-click status and you get the activity being viewed in real hardware

when I select the "label" on abstract design
and choose "horizontal anchor = both" the label instead of keeping the size ratio on the width of the screen is reduced in size as with = 10 for example.

abstract designer now does exactly what I want, it keeps the aspect ratio.

I hope I have been clear and sufiente
thanks for listening
 
Upvote 0

Sannie72

Member
Licensed User
Longtime User
Erel, I am currently using BETA3, but I find that when I use a Spinner View in the designer, I can enter a Prompt property. The text that I enter there never shows on the device. Any suggestions? (samsung S3, android 4.3)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is not a bug.

Set the abstract designer layout to Match Connected Device. Now it will not happen.

The reason for this change is that changing the anchor requires a "reference screen". If the abstract designer is visible then the abstract designer is the reference screen. If its abstract designer size is not identical to the device size then the view will change its position or size on the device (it must).

Erel, I am currently using BETA3, but I find that when I use a Spinner View in the designer, I can enter a Prompt property. The text that I enter there never shows on the device. Any suggestions?
The Prompt property sets the title that appears in the Spinner dialog. This dialog only appears in Android 2 devices when the spinner is opened.
 
Upvote 0

leandroavila74

Member
Licensed User
Longtime User
This is not a bug.

Set the abstract designer layout to Match Connected Device. Now it will not happen.

The reason for this change is that changing the anchor requires a "reference screen". If the abstract designer is visible then the abstract designer is the reference screen. If its abstract designer size is not identical to the device size then the view will change its position or size on the device (it must).

Erel,
I did exactly what you suggested
Layout-> Match Connected Device = marked

Then the abstract designer began to reflect the behavior of the hardware
even when I changed the screen orientation (perfect!)

But the problem still remains, if I put a EditText on the screen that occupies
entire screen of abstract designer and try to set the "horizontal anchor = both" property
the problem persists.

An interesting detail, if I start to decrease the width of EditText in the abstract designer EditText that is in the actual display hardware starts to increase its width.

What can it be?
 
Upvote 0

leandroavila74

Member
Licensed User
Longtime User

Attachments

  • hardware.jpg
    hardware.jpg
    251.7 KB · Views: 363
  • abstract-designer.jpg
    abstract-designer.jpg
    227.4 KB · Views: 351
Upvote 0

leandroavila74

Member
Licensed User
Longtime User
The designer version wasn't updated by mistake.

Please try the following steps:
- Uninstall B4A Designer from the device.
- Reconnect B4A-Bridge and let it install the designer.

Erel,
it worked!

What a beauty, now I can remove the "designer scripts" codes
my drawing screens.

The package version is still 2.71, the same as it was before the update,
but that's just a detail.

Many thanks for the help.
 
Upvote 0

leandroavila74

Member
Licensed User
Longtime User
Erel,
You can put the designer in the application of rules of alignment when you put those two components in the same vertical or horizontal line, when they are in the same coordinate inform this visually?

I miss that, sometimes I'm not sure whether the items on the screen is actually aligned.
 
Upvote 0

leandroavila74

Member
Licensed User
Longtime User
Hi Erel,

Another item that will be welcomed in a future version is that you can go straight through the designer for the event of a component equal to delphi or visual studio and if it goes double click opens the onclick, it greatly facilitates the location of the events, we now to search manually.

Thx
 
Upvote 0
Top