Are there any methods for android development that can find the maximum units on screen?
I'm drawing a rectangle and I'm trying to figure out the maximum dimensions of the display I'm using with开发者_如何学Goout trial and error. I know the top left corner is (0,0), but is there a method that retrieves the outer edge coordinates?
In your activity you can call:
Display display = getWindowManager().getDefaultDisplay();
display.getWidth(); // returns width
display.getHeight(); // returns height
This will give you the maximum dimensions of the current display.
精彩评论