When your app provides multiple resource directories with different values for these configurations, the system uses the one closest to (without exceeding) the device's current screen width. Closest to is determined by adding the differences between the actual screen width and the specified width with the difference between the actual screen height and the specified height, with unspecified heights and widths having the value of 0.