Android Question Canvas size not containing my variant

Cclaws

Member
I am designing an app for personal use in portrait mode on a specific device -- Samsung S9. I want to keep the system status bar at the top but hide the system navigation bar. I need every pixel I can get because the design needs to cram a lot of functionality onto one screen to be used efficiently in real time.

Samsung S9 is 1440 x 2960 px. If I subtract 48 px for the status bar, that should give me 1440 x 2912 pixels. When I set my variant size to 1440 x 2912 pixels, it appears outside of the white square which I'm guessing is the canvas.

Is there a way to fit it into the Abstract Designer's canvas? Do I need to cut it in half to 720 x 1456?
 

Attachments

  • Screenshot 2024-05-17 231303.png
    27.3 KB · Views: 89
Last edited:

Brian Dean

Well-Known Member
Licensed User
Longtime User
The Layout Designer is built to make it easy to design layouts that will automatically fit different screen sizes. What you call the "canvas" is a notional screen area. One normally designs a layout in which the views are "anchored" to the screen edges; their sizes are specified in dips (device independent pixels). When the layout opens on a real device it automatically scales itself to fit the exact screen limits irrespective of the actual pixel dimensions. This is what most people want. Although it might appear counterintuitive you should try to design your layout in the same way if at all possible, otherwise you will to some extent find yourself fighting with the Layout Designer's expectations.

If you want to take the path of designing a bespoke layout for a single device then you can do so, of course, and set up a specific variant. But be aware of the difference between dips - the natural units used by the designer - and actual device pixels.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…