amit 3 Posted January 1, 2021 (edited) SORRY IT SHOULD BE IN FMX Group. AMIT. Hi, I try to create simple android app using FMX component. I create the Galaxy Note 5 view from its specification, Screen Resolution: 1440x2560, PPI=518, Screen size = 5.7". I place 3 buttons on the form and compile and run. It is working fine but the position of all buttons is displayed inproperly as shown. This is the picture at design time. and next is the picture that shown on the actual device (Galaxy Note 5) Please suggest what I did wrong. Here is the code on package of the View I made. unit Note5; interface implementation uses system.Devices, system.Types, system.SysUtils; const ViewName = 'Note5'; // 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(1280,720), TSize.Create(586, 330), // MinPhysicalSize(max, min), MinLogicalSize(max, min) TSize.Create(2560,1440), TSize.Create(1280, 720), // MaxPhysicalSize(max,min), MaxLogicalSize(max,min) TOSVersion.TPlatform.pfAndroid, 518); //Select the platform and the pixel density. finalization TDeviceinfo.RemoveDevice(ViewName); // To unregister the view after unistalling the package. end. Edited January 1, 2021 by amit Post in wrong group. Share this post Link to post
Rollo62 536 Posted January 1, 2021 Use grouping in TLayouts, and alignment via Align.Top Left Client etc., Create gaps via Margins . .. Share this post Link to post