public class DeviceUtil
extends java.lang.Object
| Constructor and Description |
|---|
DeviceUtil(android.content.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
createSupportedScreenSizes() |
AdSize |
getSizeLandscape() |
AdSize |
getSizePortrait() |
boolean |
isTablet()
Indicate if the device is a tablet or not.
|
boolean |
isVersionSupported() |
void |
setScreenSize(int screenWidth,
int screenHeight) |
public boolean isTablet()
The definition of a tablet is based on its smallest width: if width is above or equal to 600dp, then it is a tablet.
The corollary is that, if this is not a tablet, then we consider this as a mobile.
true if this device is a tabletpublic void createSupportedScreenSizes()
public void setScreenSize(int screenWidth,
int screenHeight)
public AdSize getSizePortrait()
public AdSize getSizeLandscape()
public boolean isVersionSupported()