In Android, we have different screen sizes depending on the devices so if we need to set width and height of components dynamically, we will need to know the current device’s screen dimension. We do that by getting “Display” object from “Window Manager” so in current “Activity” class: ?View Code JAVA1 2 3 Display display [...]