I'm happy to release a new BETA version of B4A.
The main improvements in this version are related to new requirements enforced with targetSdkVersion=36. Apps running on new devices now run in edge to edge mode (E2E). This means that the activity fills the whole screen and other elements, such as the system bars, are overlaid on top of it. The way to deal with this change is to add a "root" panel that is positioned in the content area and add any layout that shouldn't be covered by the non-app elements to this panel.
In B4XPages, each page is made of a panel and this panel is resized based on the content area, so no changes are needed.
For non-B4XPages projects, you can adapt the code from the default template:
Note that this code will also work properly on devices not running in E2E mode.
There is a new attribute named #EdgeToEdgeOldDevices. It enables E2E mode on older devices and is recommended for better compatibility.
Note that the IME library was updated with features related to this mode. The handling of keyboard height changes is implemented differently when running in E2E and I expect it to work better than the previous non-E2E implementation.
The enableOnBackInvokedCallback attribute is set to false by default: https://developer.android.com/guide/topics/manifest/activity-element#enableOnBackInvokedCallback.
The light and dark theme macros were updated. You can find the updated snippets inside libraries\Themes.jar. The now disabled enforcement of non-E2E was removed and windowLightStatusBar was added to the light theme.
Additional changes:
- Exception.StackTrace property.
- ThrowException keyword
- Bug fixes and other minor changes.
Download link: https://www.b4x.com/android/files/beta.exe
The main improvements in this version are related to new requirements enforced with targetSdkVersion=36. Apps running on new devices now run in edge to edge mode (E2E). This means that the activity fills the whole screen and other elements, such as the system bars, are overlaid on top of it. The way to deal with this change is to add a "root" panel that is positioned in the content area and add any layout that shouldn't be covered by the non-app elements to this panel.
In B4XPages, each page is made of a panel and this panel is resized based on the content area, so no changes are needed.
For non-B4XPages projects, you can adapt the code from the default template:
B4X:
Sub Globals
Private ime As IME
Private root As B4XView
End Sub
Sub Activity_Create(FirstTime As Boolean)
ime.Initialize("ime")
root = xui.CreatePanel("")
Dim Content As Rect = ime.GetContentRect
Activity.AddView(root, Content.Left, Content.Top, Content.Width, Content.Height)
ime.UpdatePercentageReference(root.Width, root.Height)
root.LoadLayout("Layout")
End Sub
There is a new attribute named #EdgeToEdgeOldDevices. It enables E2E mode on older devices and is recommended for better compatibility.
Note that the IME library was updated with features related to this mode. The handling of keyboard height changes is implemented differently when running in E2E and I expect it to work better than the previous non-E2E implementation.
The enableOnBackInvokedCallback attribute is set to false by default: https://developer.android.com/guide/topics/manifest/activity-element#enableOnBackInvokedCallback.
The light and dark theme macros were updated. You can find the updated snippets inside libraries\Themes.jar. The now disabled enforcement of non-E2E was removed and windowLightStatusBar was added to the light theme.
Additional changes:
- Exception.StackTrace property.
- ThrowException keyword
- Bug fixes and other minor changes.
B4X:
Root.Color = xui.Color_Gray
B4XPages.GetNativeParent(Me).Color = xui.Color_Magenta
Download link: https://www.b4x.com/android/files/beta.exe