Jump to content
Sign in to follow this  
amit

Display problem Galaxy Note 5

Recommended Posts

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.

image.thumb.png.fd3144bdd29f0d9e73b65868ffe7bcb4.png

 

 

and next is the picture that shown on the actual device (Galaxy Note 5)

image.png.939a297d92103a3d53ade044251c4915.png

 

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 by amit
Post in wrong group.

Share this post


Link to post

Use grouping in TLayouts, and alignment via Align.Top Left Client etc.,

Create gaps via Margins . ..

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×