Jump to content
alejandro.sawers

Android 15 and edge-to-edge enforcement

Recommended Posts

The Android edge-to-edge problem is claimed to be fixed with Delphi 13.

Have you tried? 

Share this post


Link to post
9 hours ago, Stewag said:

The Android edge-to-edge problem is claimed to be fixed with Delphi 13.

Have you tried? 

What means "fixed", where is this noted?
There are use-cases in views where I want edge-to-edge and where I don't.
Is there a kind of switch in Delphi to handle this, perhaps even on-the-fly?
Personally I think the right way would be to do this in the manifest file, but this is for the whole application only.

Perhaps it would make sense to have options to switch the Form between normal, normal-edge-to-edge, fullscreen, fullscreen-edge-to-edge,
without hacking this on my own.
Now a solutions could be to insert layouts and elements on the form, in the way you want, showing or don't showing depending on the version.

I'm still installing and setup a fresh Delphi 13, if you have infos I can try to test this.
 

Share this post


Link to post
38 minutes ago, Rollo62 said:

What means "fixed", where is this noted?

All that was added (and it appears it was not documented), was control over whether or not the "opt out" flag is set:

image.thumb.png.3daefa0562ab60282ffb70e2338f3e04.png


If you leave it as true, you shouldn't need to do anything special for your app. If you change it to false, Android will apply edge-to-edge rules, so you'll need to cater for any areas that go outside the "normal" area. 

 

Once Android start enforcing targeting of Android 16, there will be no choice, as they will be taking away the option to opt out.

45 minutes ago, Rollo62 said:

Now a solutions could be to insert layouts and elements on the form, in the way you want, showing or don't showing depending on the version.

Exactly. There is also the issue of the color of the status bar items - if your "opt in" and your form background is on the "bright side", you could use this code to make status bar items "dark":

uses
  Androidapi.Helpers,
  Androidapi.JNI.GraphicsContentViewText;
  
constructor TForm1.Create(AOwner: TComponent);
begin
  inherited;
  TAndroidHelper.Activity.getWindow.getInsetsController.setSystemBarsAppearance(
    TJWindowInsetsController.JavaClass.APPEARANCE_LIGHT_STATUS_BARS, TJWindowInsetsController.JavaClass.APPEARANCE_LIGHT_STATUS_BARS
  );
end;

 

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×