code: private Point getScreenSize() {
          Point size = new Point();
          getWindowManager().getDefaultDisplay().getSize(size);
          return size;
      }
docs: Retrieves the screen size from the Activity context
  @return the screen size as a Point object