//paparazzi/app.cash.paparazzi/DeviceConfig
DeviceConfig¶
[jvm]\ data 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¶
DeviceConfig | [jvm] 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¶
Name | Summary |
---|---|
Companion | [jvm] object Companion Device specs per: https://android.googlesource.com/platform/tools/base/+/mirror-goog-studio-master-dev/sdklib/src/main/java/com/android/sdklib/devices/nexus.xml |
Properties¶
Name | Summary |
---|---|
density | [jvm] val density: Density |
folderConfiguration | [jvm] val folderConfiguration: FolderConfiguration |
fontScale | [jvm] val fontScale: Float = 1.0f |
hardwareConfig | [jvm] val hardwareConfig: HardwareConfig |
keyboard | [jvm] val keyboard: Keyboard |
keyboardState | [jvm] val keyboardState: KeyboardState |
layoutDirection | [jvm] val layoutDirection: LayoutDirection |
locale | [jvm] val locale: String? = null |
navigation | [jvm] val navigation: Navigation |
nightMode | [jvm] val nightMode: NightMode |
orientation | [jvm] val orientation: ScreenOrientation |
ratio | [jvm] val ratio: ScreenRatio |
released | [jvm] val released: String |
screenHeight | [jvm] val screenHeight: Int = 1280 |
screenRound | [jvm] val screenRound: ScreenRound? = null |
screenWidth | [jvm] val screenWidth: Int = 768 |
size | [jvm] val size: ScreenSize |
softButtons | [jvm] val softButtons: Boolean = true |
touchScreen | [jvm] val touchScreen: TouchScreen |
uiMode | [jvm] val uiMode: UiMode |
uiModeMask | [jvm] val uiModeMask: Int |
xdpi | [jvm] val xdpi: Int = 320 |
ydpi | [jvm] val ydpi: Int = 320 |