Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Desarrollo en Delphi para Android (https://www.clubdelphi.com/foros/forumdisplay.php?f=57)
-   -   Aplicación por debajo de la barra de notificaciones? Android 5.5'' (https://www.clubdelphi.com/foros/showthread.php?t=89951)

wolfran_hack 08-03-2016 14:22:55

Aplicación por debajo de la barra de notificaciones? Android 5.5''
 
Buenas miembros del foro, no se si a alguien ya le paso o es por el móvil que tengo actualmente, pero bueno, paso a comentarles.

Tengo un Asus ZenFone 2 ZE551ML de 5.5'' que estoy utilizando para debuggear la aplicación, y me pasa que la aplicación se carga debajo de la barra de notificaciones, así:



como se puede solucionar esto? intente de crear la de 5'' tampoco, sigue igual.

Neftali [Germán.Estévez] 08-03-2016 16:09:01

Deberías colocar la imagen de alguna otra forma, ya que no se aprecia.

wolfran_hack 08-03-2016 16:34:01


AgustinOrtu 08-03-2016 17:10:04

Yo creo que lo mejor es que lo reportes a Embarcadero

Por curiosidad, como esta conformado ese layout? Que componentes usas y como estan las propiedades Align?

Que pasa si volteas el telefono? (ponerlo de lado)

Esa barra de notificaciones no es la "nativa" de Android, no sera ese el problema?

wolfran_hack 08-03-2016 18:23:55

@AgustinOrtu donde se reporta?

es el que viene en Delphi como Multi-Divice > Tabbed

Si volteo el teléfono hace lo mismo.

El Asus tiene el ZenUI APP como Launcher nativo. No tiene problemas con otras aplicaciones.

AgustinOrtu 08-03-2016 18:30:07

quality.embarcadero.com

wolfran_hack 08-03-2016 19:59:32

Ya lo solucione:

1.- Buscar en: C:\Program Files (x86)\Embarcadero\Studio\17.0\source\fmx el archivo: FMX.Platform.Android.pas
2.- Copiarlo en la carpeta del proyecto.
3.- Buscar y reemplazar:

Código Delphi [-]
function TWindowManager.RetrieveContentRect: TRect; ”

con:

Código Delphi [-]
function TWindowManager.RetrieveContentRect: TRect;
var
 Activity: JActivity;
 NativeWin: JWindow;
 DecorView: JView;
 ContentRectVisible, ContentRect: JRect;
begin
 Activity := SharedActivity;
 if Activity <> nil then
 begin
 NativeWin := Activity.getWindow;
 if NativeWin <> nil then
 begin
 FStatusBarHeight := FNewContentRect.top;
 ContentRect := TJRect.Create;
 DecorView := NativeWin.getDecorView;
 DecorView.getDrawingRect(ContentRect);
 // Fix by Flying Wang &
 CallInUIThread(
 procedure
 begin
 if (not PlatformAndroid.GetFullScreen(nil)) and (SharedActivity.getWindow.getAttributes.flags and
 TJWindowManager_LayoutParams.JavaClass.FLAG_FULLSCREEN <> TJWindowManager_LayoutParams.JavaClass.FLAG_FULLSCREEN) then
 begin
 // http://www.2cto.com/kf/201307/227536.html
 ContentRectVisible := TJRect.Create;
 DecorView.getWindowVisibleDisplayFrame(ContentRectVisible);
 if (ContentRect.top < 1) or (ContentRectVisible.top < FStatusBarHeight) then
 begin
 ContentRect.top := ContentRectVisible.top;
 FNewContentRect.top := ContentRectVisible.top;
 FStatusBarHeight := FNewContentRect.top;
 end;
 end;
 end);
 Result := TRect.Create(Round(FNewContentRect.left / FScale), Round(FNewContentRect.top / FScale), Round(ContentRect.right / FScale),
 Round(ContentRect.bottom / FScale));
 end;
 end;
end;

Fuente: https://magnumlabs.wordpress.com/201...based-devices/


La franja horaria es GMT +2. Ahora son las 15:50:03.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi