This method of the Device Class retrieves the device aspect ratio in terms of an integer.
public int getAspectRatioXY();
Returns an integer that defines the device aspect ratio.