automotive-design-compose icon indicating copy to clipboard operation
automotive-design-compose copied to clipboard

Resolution is accurate only for mdpi densities

Open HooHaa-code opened this issue 1 year ago • 4 comments

This sample project has some banding around the edges to ensure that all pixels a being properly rendered. Steps to reproduce:

  1. Create a virtual device with a resolution of 800x1280 and a screen size of 9image
  2. Create a second virtual device with a resolution of 800x1280 and a screen size of 12image
  3. Run the same app on both devices
  4. Notice that the rendering is very different on both devices

image image

Ex4Google.zip

HooHaa-code avatar Jul 10 '24 16:07 HooHaa-code

Sorry I may not be understanding something here. It looks to me that the bottom screen is on a device with the same resolution, but a different pixel density, so everything is rendered larger. That is intended.

rylin8 avatar Jul 17 '24 05:07 rylin8

The bottom image is mdpi, the top image is ldpi.

If this is intended behavior, then we should have a discussion about it during our next meeting. Basically, designers have trouble grasping the concept of pixel density. They would expect that a figma file at the same resolution as a display would completely fill that display no matter what the density is

HooHaa-code avatar Jul 17 '24 10:07 HooHaa-code

@HooHaa-code I believe we discussed this offline. Do you still think there is a need for this?

rylin8 avatar Sep 09 '24 21:09 rylin8

Yes, I think there is still a need.

From my understanding, design compose converts figma px to dp. I think this is going to be a pain point for our designers as they are not going to be familiar with dp. I think we discussed having a toggle where we can decided to use px or dp.

HooHaa-code avatar Sep 09 '24 22:09 HooHaa-code

We discussed this in some detail recently, and we don't want to support this. For our Instrument Cluster framework and native renderer, we implemented the Android "dp" concept so that we match scales across displays (and can have both Android and the native renderer draw on the same display with everything matching up).

If we did implement support for scaling outside of dp, then we wouldn't be using it ourselves, and it touches enough of the rendering logic that it would be hard to maintain full test coverage of the feature (i.e.: we could get coverage with the initial implementation, but would need to keep adding tests for scaling with new features).

I'm open to revisit this in the future as we have more things including DesignCompose.

iamralpht avatar Nov 27 '24 04:11 iamralpht

Not implementing this per previous comment.

rylin8 avatar Dec 12 '24 05:12 rylin8