0

I am building an app that needs to know the location of a pixel on the screen in cm relative to a margin point on the screen (say up left corner to be (0,0)) now I can get the dp of the screen and the pixle and go back and forth between them. is it possible to convert these aspects to cm values on run time? thank!

  • Your app does not always control the full screen. What do you intend to do for split-screen mode, Chrome OS, Samsung DeX, foldables, and so on? – CommonsWare Nov 06 '21 at 12:24
  • the application is for research purposes and will not be demanded to handle that kind of behaviar – nitzan karby Nov 06 '21 at 12:35
  • Does this answer your question? [Is there a way to determine android physical screen height in cm or inches?](https://stackoverflow.com/questions/2193457/is-there-a-way-to-determine-android-physical-screen-height-in-cm-or-inches) – Henry Twist Nov 06 '21 at 13:40

0 Answers0