Im using
RectF(float left, float top, float right, float bottom)
to create a rectangle. For some the max x value and max y value going out of Screen. But the same values lies inside the screen for some big screens. So is there anyway to check what is the max value for the current Screen so that i can use the cordinates within the screen.
you can fetch width and height of screen, by following:
Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
here width and height are max points in x and y direction.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With