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)
-   -   Adding a Customized View to the View Selector (https://www.clubdelphi.com/foros/showthread.php?t=95348)

Ralevi 21-08-2021 04:14:51

Adding a Customized View to the View Selector
 
En el view Selector salen de Android solo de 4" y 5", algo desfasados ya, estoy probando las App en un Xiaomi de 6.43"

¿Hay algun sitio donde descargar otros View de otros tamaños, para añadir al selector?

Gracias

Ralevi 21-08-2021 14:38:30

Mas pruebas, mas errores :)
 
Encontré una web donde explicaba como crear la vista personalizada, y para instalarla en RAD hay que crear un paquete, sigo estas instrucciones:

Código:

unit Unit1;

interface

implementation

uses

  system.Devices, system.Types, system.SysUtils;

const
  ViewName = 'RedmiNote10'; // The unique name of the view, it has to be the same name as the one written between <Name></Name> tags of the DevicePreset.xml file.

initialization


  TDeviceinfo.AddDevice(TDeviceinfo.TDeviceClass.Phone, ViewName,
    TSize.Create(2315, 1055), TSize.Create(2315 div 2 ,1055 div 2), // MinPhysicalSize(max, min), MinLogicalSize(max, min)
    TSize.Create(2400, 1080), TSize.Create(2400 div 2, 1080 div 2), // MaxPhysicalSize(max,min), MaxLogicalSize(max,min)
    TOSVersion.TPlatform.pfAndroid, 409); //Select the platform and the pixel density.


finalization

  TDeviceinfo.RemoveDevice(ViewName); // To unregister the view after unistalling the package.

end.

Pero al ejecutar, para crear ls BPL me dice:
Cannot run project unless a host application is defined.
Use the Run/Parameters... dialog box

¿Que me falta hacer?

Gracias anticipadas
PD la modificacion del DevicePreset.xml esta efectuada

cloayza 23-08-2021 16:42:30

Estimado Ralevi, comparta el enlace a la web que indica...
De seguro a varios nos servirá.

Saludos cordiales

Ralevi 23-08-2021 17:31:35

Este es la pagina:

https://docwiki.embarcadero.com/RADS..._View_Selector

Saludos

cloayza 24-08-2021 15:33:35

Gracias Ralevi

^\||/


La franja horaria es GMT +2. Ahora son las 09:43:13.

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