Device Config
class DeviceConfig(val screenHeight: Int = 1280, val screenWidth: Int = 768, val xdpi: Int = 320, val ydpi: Int = 320, val orientation: ScreenOrientation = ScreenOrientation.PORTRAIT, val uiMode: UiMode = UiMode.NORMAL, val nightMode: NightMode = NightMode.NOTNIGHT, val density: Density = Density.XHIGH, val fontScale: Float = 1.0f, val layoutDirection: LayoutDirection = LayoutDirection.LTR, val locale: String? = null, val ratio: ScreenRatio = ScreenRatio.NOTLONG, val size: ScreenSize = ScreenSize.NORMAL, val keyboard: Keyboard = Keyboard.NOKEY, val touchScreen: TouchScreen = TouchScreen.FINGER, val keyboardState: KeyboardState = KeyboardState.SOFT, val softButtons: Boolean = true, val navigation: Navigation = Navigation.NONAV, val screenRound: ScreenRound? = null, val released: String = "November 13, 2012")
Provides FolderConfiguration and HardwareConfig for various devices. Also provides utility methods to parse build.prop
and attrs.xml
to generate the appropriate maps.
Defaults are for a Nexus 4 device.
Constructors
Link copied to clipboard
constructor(screenHeight: Int = 1280, screenWidth: Int = 768, xdpi: Int = 320, ydpi: Int = 320, orientation: ScreenOrientation = ScreenOrientation.PORTRAIT, uiMode: UiMode = UiMode.NORMAL, nightMode: NightMode = NightMode.NOTNIGHT, density: Density = Density.XHIGH, fontScale: Float = 1.0f, layoutDirection: LayoutDirection = LayoutDirection.LTR, locale: String? = null, ratio: ScreenRatio = ScreenRatio.NOTLONG, size: ScreenSize = ScreenSize.NORMAL, keyboard: Keyboard = Keyboard.NOKEY, touchScreen: TouchScreen = TouchScreen.FINGER, keyboardState: KeyboardState = KeyboardState.SOFT, softButtons: Boolean = true, navigation: Navigation = Navigation.NONAV, screenRound: ScreenRound? = null, released: String = "November 13, 2012")
Types
Properties
Functions
Link copied to clipboard
fun copy(screenHeight: Int = this.screenHeight, screenWidth: Int = this.screenWidth, xdpi: Int = this.xdpi, ydpi: Int = this.ydpi, orientation: ScreenOrientation = this.orientation, uiMode: UiMode = this.uiMode, nightMode: NightMode = this.nightMode, density: Density = this.density, fontScale: Float = this.fontScale, layoutDirection: LayoutDirection = this.layoutDirection, locale: String? = this.locale, ratio: ScreenRatio = this.ratio, size: ScreenSize = this.size, keyboard: Keyboard = this.keyboard, touchScreen: TouchScreen = this.touchScreen, keyboardState: KeyboardState = this.keyboardState, softButtons: Boolean = this.softButtons, navigation: Navigation = this.navigation, screenRound: ScreenRound? = this.screenRound): DeviceConfig