| Start |
|---|
| Get the screens pixel dimensions To retreive the screens width and height in pixels, we can make use of the WindowManagers (opens new window) display metrics. These DisplayMetrics (opens new window) hold a series of information about the devices screen, like its density or size: |
| Get screen density To get the screens density, we also can make use of the Windowmanagers (opens new window) DisplayMetrics (opens new window). This is a quick example: |
| Formula px to dp, dp to px conversation DP to Pixel: Pixel to DP: |
Read Article
https://develop.horje.com/learn/1434/reference