Stewag 2 Posted Monday at 07:30 PM The Android edge-to-edge problem is claimed to be fixed with Delphi 13. Have you tried? Share this post Link to post
Rollo62 608 Posted Tuesday at 04:58 AM 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
Dave Nottage 634 Posted Tuesday at 05:57 AM 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: 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; 1 Share this post Link to post
Build3999 10 Posted Tuesday at 09:55 PM Something interesting is the new 'OnSafeAreaChanged' event in the form that gets the safe padding to avoid overlapping with system bars. Starting with Android SDK 36, all apps will be required to handle screen insets. However, in the Embarcadero docwiki documentation, it appears without any description. It's not mentioned in the tutorials either. 2 Share this post Link to post
Dave Nottage 634 Posted Tuesday at 09:58 PM (edited) 8 minutes ago, Build3999 said: new 'OnSafeAreaChanged' event in the form Thanks for the heads up! To follow on from my earlier code example: procedure TForm1.FormSafeAreaChanged(Sender: TObject; const AInsets: TRectF); begin Padding.Rect := AInsets.Round; end; Basically ensures that controls on the form do not encroach on the "safe" areas. Edited Tuesday at 10:04 PM by Dave Nottage Share this post Link to post