PDA

Ver la Versión Completa : Aplicación por debajo de la barra de notificaciones? Android 5.5''


wolfran_hack
08-03-2016, 14:22:55
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 (https://www.asus.com/Phone/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í:

https://k60.kn3.net/1/0/C/C/1/A/D6A.png

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
https://k60.kn3.net/0/8/F/8/0/9/E3D.png

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 (http://www.asus.com/ZenUI/)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:

” function TWindowManager.RetrieveContentRect: TRect; ”

con:

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/2015/10/10/delphiandroid-misalignment-status-bar-on-intel-based-devices/