1

I ran an application on my nexus 7 that calculated the screen width and height on my device. In portrait mode, my application gave me a height of 1824 px and a width of 1200 px. These dimensions made sense to me. However in landscape mode, my application gave me a height of 1104px and a width of 1920 px. From Does the Width and Height change with orientation?, I got that with changing orientation, screen width and height change, but shouldnt the dimensions just flip? To me, its the same fundamental screen

The code i used to calculate the screen size

Display display = getWindowManager().getDefaultDisplay();
int height = display.getHeight();
int width = display.getWidth();
Community
  • 1
  • 1
committedandroider
  • 8,711
  • 14
  • 71
  • 126

0 Answers0