device static method
Return DEVICE type
0 <= Mobile portrait
<= 480 <= Tablet portrait
<= 720 <= Web
Web
is also equal to mobile landscape
and tablet landscape
and also desktop
Implementation
static DEVICE device() {
final _smallestWidth = smallestWidth();
if (_smallestWidth <= 480.0) {
return DEVICE.MOBILE_PORTRAIT;
} else if (_smallestWidth <= 720.0) {
return DEVICE.TABLET_PORTRAIT;
} else {
return DEVICE.WEB;
}
}