Stewag 1 Posted Monday at 08:12 AM (edited) Since long I wonder, how the different views that I configured for iOS and Android form-factors apply to displays, that do not fit in. For example, I saw at a friend's 6.5" Samsung that a "wrong" text size is used. I configured 5.8" and 6.8" views and would like to know which one (if any?) of the two was applied to the 6.5" device. I tried to find a way to display the currently applied fmx view, e.g. by pressing a label but have found no way yet. Maybe this is not possible as events are inherited? Or is there a way? I use TGrindPanelLayout to evenly spread components over the screen but have found no way yet, to scale text size for displays from 3.5 to 10 Inch displays other than using views. I'd be happy to abandon views and solve the text-size scaling problem with code. Any ideas for this out there? Edited Monday at 08:13 AM by Stewag Share this post Link to post
Patrick PREMARTIN 115 Posted Monday at 05:15 PM Drawing forms according to screen size is a nice feature when targeting a particular device model, but if it's for the general public, don't use it. FMX uses the source screen with the same width/height for a specified OS. Just 2 pixels wider and it returns to the default view (according to tests I did a long time ago). It's preferable to draw our screens using the numerous layouts (grid, flow, layout) and alignments. Think responsive, like for a web page. If you draw your screen by pixel, use a TScaleLayout as a global container. It has a virtual size and a real size. You can use it to adapt the size of your content or add a zoom in / zoom out feature. Look a "screens" samples in GetIt to see how Embarcadero suggest to use those features for classic screens in a mobile app. Share this post Link to post
Stewag 1 Posted 23 hours ago Thank you Patrick, that is really helpful! I must admit that I was a little confused in the beginning, but I found a good tutorial, that shows TScaleLayout's function: https://www.youtube.com/watch?v=zaMaCGLZQt8&ab_channel=D%C3%A9veloppeurPascal Steffen Share this post Link to post
Patrick PREMARTIN 115 Posted 22 hours ago I'm glad to see that my videos are sometimes useful. 😉 Share this post Link to post
Stewag 1 Posted 21 hours ago (edited) Oh, I was not aware, that it is yours I am even more thankful then! Have you tested the behaviour with a mobile app for general usage? Edited 21 hours ago by Stewag 1 Share this post Link to post