Skip to main content
Question

Custom Scale Factor for Android in Dev Mode

  • December 14, 2023
  • 1 reply
  • 530 views

Please let me know if there is any way/plugin to set up a custom scale factor for the pixel to Dp conversion.

Right now I can only see 1/3, 1/2 , No scaling, 2, 3 as the unit suggestions for
Scale factor for scaling dimensions into Android dp/sp

Where as other tools like Sympli will allow me to setup a custom conversion ratio from Pixels to android dp/sp

This topic has been closed for replies.

1 reply

Reed_Ellsworth

Custom scale factor is required for modern android development. Android/compose no longer uses the logical density buckets (mdpi, hdpi, xdpi etc) when drawing. It uses the actual scaling factor to get exact density independent drawing.

So using custom scale factors is a requirement for the android code representation to have any value


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings