Ok I’m just struggling to do this. So I know it will involve displayDensity but I either don’t understand how this is documented or I’m doing something wrong. So I created my app on a 441 dpi screen-displayDensity value of 2.625. I am thinking that I will need to come up with some value that I multiply every graphical element by. I’m just overall confused on how I would go about doing this. I am thinking it would then be when displayDensity is 2.625, the value should equal 1, so I have
float val = displayDensity*(1/2.625);
but this is not working.
Any help is appreciated
EDIT: I might have actually done it right but was calling the above just in nothingness but after moving it into a function, it is currently working. Unsure of how this will work on other screen resolutions though so if you see a lapse in my reasoning please let me know!
EDIT: I have finally been able to test it on a phone with a different resolution and it is not working at all. So what do I need to know?