18
Jul
Table of contents TLDR (too long didn't read) Why does this matter? Resources My app on the Google play store My app's GitHub code TLDR (too long didn't read) When trying to get the height of a Android device, make sure you do it in an pixel density independent way: correct way to get height: val displayMetrics = Resources.getSystem().displayMetrics val heightPixels = displayMetrics.heightPixels //exact physical pixel amount(different on certain devices) val density = displayMetrics.density //density multiplier val pixelDensityIndependentHeight =heightPixels / density Enter fullscreen mode Exit fullscreen mode val height = Resources.getSystem().displayMetrics.heightPixels //as previously mentioned, this height will change depending on…