Konuyu Oyla:
  • Derecelendirme: 0/5 - 0 oy
  • 1
  • 2
  • 3
  • 4
  • 5
Android 16 Uygulama Ekran Taşma Sorunu[ÇÖZÜLDÜ]
#1
Merhaba arkadaşlar

Başlıkta da belirttiğim gibi Google playdeki bir uygulamamın android son versiyonda ekrandan taşma yaptığını farkettim üst bar saat ve diğer bildirimlerin altında kalıyor. Aynı zamanda alt barda navigasyon tuşlarının altında kalıyor. Bu sorunlardan farklı olarak geri tuşu son versiyonda ekranın sol köşesine taşınmış ve uygulamada işlevini sağlamıyor.
Bununla ilgili aynı sorunlarla karşılaşan var mı gerçekten kötü bir görüntüye sebep oluyor bu durum kullanıcı açısından kötü deneyim sağlıyor ve kullanıcı kaybı yaratıyor bu sorunu nasıl çözerim yardımlarınızı bekliyorum

Not : Rad studio 13.1 36.1 SDK kullanıyorum.
Cevapla
#2
https://developer.android.com/develop/ui...edge?hl=tr
https://developer.android.com/guide/navi...ture?hl=tr
MSWindows, AndroidRAD Studio 13 Florence ve kafamda bir fikir  Tongue  
WWW
Cevapla
#3
ARMandroid Splash Tool ( for FMX Android Developers )
Android 15 and edge-to-edge enforcement
App overlaps Android system bar
Cevapla
#4
NOTE:  Google translator it's horrible ok!!!


Scenary:
a) Delphi 13.1
b) Android 16 ( API 36 ) - using Android Simulator by Google

1) in fact, the solutions already exists in Delphi 13.x using "Form.... SafeAreaChanged" event:
a) use a "container" ( like TLayout, TPanel, etc... ) to accomodate your visual components, define the "Align" property to "Client"
b) in "SafeAreaChanged" from Form, just re-define the 4 "Padding" properties

procedure TForm1.FormSafeAreaChanged( Sender: TObject; const AInsets: TRectF );
begin
 Padding.Top    := AInsets.Top;
 Padding.Left   := AInsets.Left;
 Padding.Right  := AInsets.Right;
 Padding.Bottom := AInsets.Bottom;
 //
 // visual tests...
 Memo1.Text := Format( 'NL=%f, NT=%f, NR=%f, NB=%f', //
   [ AInsets.Left, AInsets.Top, AInsets.Right, AInsets.Bottom ] );
end;

bds-cgme0n-Bz-Tq.gif




To demonstrate that the event is working correctly, you could switch the Android theme and observe the margins being respected.

The TForm uses "Fill.Kind = SOLID" to correctly render the Android theme, but this is not required for rotation or form margin management.

Additionally, there is a native Android API call that utilizes the "OnLayoutChange" event (which Embarcadero likely uses for the SafeAreaChanged event).

This event is part of the Android callback system; it offers greater control—being essential for class and system-level registration—and provides additional functionality.

The form's "SafeAreaChanged" event is the most practical and straightforward option, given the form class!



procedure TWindowLayoutChangeListener.onLayoutChange( V: JView; left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom: Integer );
var
  LInsets                                         : JWindowInsets;
  LLeftInset, LTopInset, LRightInset, LBottomInset: Single;
  LNewLeft, LNewTop, LNewRight, LNewBottom        : Single;
  LScreenScale                                    : Single;
begin
  if Assigned( V ) and Assigned( FForm ) then
  begin
    LInsets := V.getRootWindowInsets;
    //
    if Assigned( LInsets ) then   
    begin

     // To illustrate the concepts, I am using many variables, but this isn't strictly necessary! Just be sure to watch out for division by zero!
      // 
      // Now, based on the device's current scale, you will be able to calculate the new values...
      // LScreenScale := TAndroidHelper.Activity.getResources.getDisplayMetrics.density;
      LScreenScale := GetScreenScale;
      //
      if LScreenScale = 0 then
        LScreenScale := 1;
      //
      LTopInset    := LInsets.getSystemWindowInsetTop;
      LLeftInset   := LInsets.getSystemWindowInsetLeft;
      LRightInset  := LInsets.getSystemWindowInsetRight;
      LBottomInset := LInsets.getSystemWindowInsetBottom;
      //
      // TForm olmadan doğrudan uygulama veya dolgu
      LNewTop    := LTopInset / LScreenScale;
      LNewLeft   := LLeftInset / LScreenScale;
      LNewRight  := LRightInset / LScreenScale;
      LNewBottom := LBottomInset / LScreenScale;
      //
      FForm.Padding.top    := LNewTop;
      FForm.Padding.left   := LNewLeft;
      FForm.Padding.right  := LNewRight;
      FForm.Padding.bottom := LNewBottom;
      //
      // Form_InsetsListener is my Form main...
      Form_InsetsListener.Memo1.Lines.Add( 'Scale=' + LScreenScale.ToString );
      Form_InsetsListener.Memo1.Lines.Add( //
        Format( 'LI=%f, TI=%f, RI=%f, BI=%f', [ LLeftInset, LTopInset, LRightInset, LBottomInset ] ) );
      Form_InsetsListener.Memo1.Lines.Add( //
        Format( 'NL=%f, NT=%f, NR=%f, NB=%f', [ LNewLeft, LNewTop, LNewRight, LNewBottom ] ) );
    end
    else
      Form_InsetsListener.Memo1.Lines.Add( 'LInsets is NIL' );
  end
  else
    Form_InsetsListener.Memo1.Lines.Add( '"V" is NIL' );
end;
MSWindows, AndroidRAD Studio 13 Florence ve kafamda bir fikir  Tongue  
WWW
Cevapla
#5
(31-07-2026, Saat: 00:04)emailx45 Adlı Kullanıcıdan Alıntı: NOTE:  Google translator it's horrible ok!!!


Scenary:
a) Delphi 13.1
b) Android 16 ( API 36 ) - using Android Simulator by Google

1) in fact, the solutions already exists in Delphi 13.x using "Form.... SafeAreaChanged" event:
a) use a "container" ( like TLayout, TPanel, etc... ) to accomodate your visual components, define the "Align" property to "Client"
b) in "SafeAreaChanged" from Form, just re-define the 4 "Padding" properties

procedure TForm1.FormSafeAreaChanged( Sender: TObject; const AInsets: TRectF );
begin
 Padding.Top    := AInsets.Top;
 Padding.Left   := AInsets.Left;
 Padding.Right  := AInsets.Right;
 Padding.Bottom := AInsets.Bottom;
 //
 // visual tests...
 Memo1.Text := Format( 'NL=%f, NT=%f, NR=%f, NB=%f', //
   [ AInsets.Left, AInsets.Top, AInsets.Right, AInsets.Bottom ] );
end;

bds-cgme0n-Bz-Tq.gif




To demonstrate that the event is working correctly, you could switch the Android theme and observe the margins being respected.

The TForm uses "Fill.Kind = SOLID" to correctly render the Android theme, but this is not required for rotation or form margin management.

Additionally, there is a native Android API call that utilizes the "OnLayoutChange" event (which Embarcadero likely uses for the SafeAreaChanged event).

This event is part of the Android callback system; it offers greater control—being essential for class and system-level registration—and provides additional functionality.

The form's "SafeAreaChanged" event is the most practical and straightforward option, given the form class!



procedure TWindowLayoutChangeListener.onLayoutChange( V: JView; left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom: Integer );
var
  LInsets                                         : JWindowInsets;
  LLeftInset, LTopInset, LRightInset, LBottomInset: Single;
  LNewLeft, LNewTop, LNewRight, LNewBottom        : Single;
  LScreenScale                                    : Single;
begin
  if Assigned( V ) and Assigned( FForm ) then
  begin
    LInsets := V.getRootWindowInsets;
    //
    if Assigned( LInsets ) then   
    begin

     // To illustrate the concepts, I am using many variables, but this isn't strictly necessary! Just be sure to watch out for division by zero!
      // 
      // Now, based on the device's current scale, you will be able to calculate the new values...
      // LScreenScale := TAndroidHelper.Activity.getResources.getDisplayMetrics.density;
      LScreenScale := GetScreenScale;
      //
      if LScreenScale = 0 then
        LScreenScale := 1;
      //
      LTopInset    := LInsets.getSystemWindowInsetTop;
      LLeftInset   := LInsets.getSystemWindowInsetLeft;
      LRightInset  := LInsets.getSystemWindowInsetRight;
      LBottomInset := LInsets.getSystemWindowInsetBottom;
      //
      // TForm olmadan doğrudan uygulama veya dolgu
      LNewTop    := LTopInset / LScreenScale;
      LNewLeft   := LLeftInset / LScreenScale;
      LNewRight  := LRightInset / LScreenScale;
      LNewBottom := LBottomInset / LScreenScale;
      //
      FForm.Padding.top    := LNewTop;
      FForm.Padding.left   := LNewLeft;
      FForm.Padding.right  := LNewRight;
      FForm.Padding.bottom := LNewBottom;
      //
      // Form_InsetsListener is my Form main...
      Form_InsetsListener.Memo1.Lines.Add( 'Scale=' + LScreenScale.ToString );
      Form_InsetsListener.Memo1.Lines.Add( //
        Format( 'LI=%f, TI=%f, RI=%f, BI=%f', [ LLeftInset, LTopInset, LRightInset, LBottomInset ] ) );
      Form_InsetsListener.Memo1.Lines.Add( //
        Format( 'NL=%f, NT=%f, NR=%f, NB=%f', [ LNewLeft, LNewTop, LNewRight, LNewBottom ] ) );
    end
    else
      Form_InsetsListener.Memo1.Lines.Add( 'LInsets is NIL' );
  end
  else
    Form_InsetsListener.Memo1.Lines.Add( '"V" is NIL' );
end;

Çok Teşekkür Ederim Sorun Çözülmüştür.   Shy
Cevapla
#6
Eski versiyonlarda fullscreen gibi bir özellik di yanlış hatırlamıyor isem.. Ama android 15 den sonra:


procedure TForm1.FormSafeAreaChanged(Sender: TObject);
begin
 // Android 15/16'in dayattığı sistem barlarının kalınlığı kadar içeriye padding (boşluk) verir
 LayoutRoot.Padding.Top := Self.SafeArea.Top;
 LayoutRoot.Padding.Bottom := Self.SafeArea.Bottom;
 LayoutRoot.Padding.Left := Self.SafeArea.Left;
 LayoutRoot.Padding.Right := Self.SafeArea.Right;
end;
// Bilgi paylaştıkça çoğalır.. 

Cevapla


Konu ile Alakalı Benzer Konular
Konular Yazar Yorumlar Okunma Son Yorum
  Google Play Billing Versiyon Sorunu[ÇÖZÜLDÜ] codder71 12 548 01-08-2026, Saat: 22:45
Son Yorum: codder71
  PHPickerDelegate Derleme Sorunu [ÇÖZÜLDÜ] codder71 13 717 18-07-2026, Saat: 22:54
Son Yorum: emailx45
  ios için uygulama derleme [ÇÖZÜLDÜ] codder71 29 2.416 01-07-2026, Saat: 14:39
Son Yorum: codder71
  Delphi FMX - Modern Android Bileşen ve Tema Yapılandırması | Rehber Mr.X 0 200 29-06-2026, Saat: 13:44
Son Yorum: Mr.X
  Çözüldü _ Delphi Community Edition SDK ayarları hatası cinarbil 2 707 08-06-2026, Saat: 16:22
Son Yorum: emailx45



Konuyu Okuyanlar: 1 Ziyaretçi