-
Notifications
You must be signed in to change notification settings - Fork 8
/
DeviceInfo.kt
33 lines (28 loc) 路 1.47 KB
/
DeviceInfo.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.kernel.finch.components.special
import com.kernel.finch.common.contracts.Finch
import com.kernel.finch.common.contracts.component.ExpandableComponent
import com.kernel.finch.common.models.Text
data class DeviceInfo(
val title: Text = Text.CharSequence(DEFAULT_TITLE),
val shouldShowManufacturer: Boolean = DEFAULT_SHOULD_SHOW_MANUFACTURER,
val shouldShowModel: Boolean = DEFAULT_SHOULD_SHOW_MODEL,
val shouldShowResolutionsPx: Boolean = DEFAULT_SHOULD_SHOW_RESOLUTION_PX,
val shouldShowResolutionsDp: Boolean = DEFAULT_SHOULD_SHOW_RESOLUTION_DP,
val shouldShowDensity: Boolean = DEFAULT_SHOULD_SHOW_DENSITY,
val shouldShowAndroidVersion: Boolean = DEFAULT_SHOULD_SHOW_ANDROID_VERSION,
override val isExpandedInitially: Boolean = DEFAULT_IS_EXPANDED_INITIALLY
) : ExpandableComponent<DeviceInfo> {
override val id: String = ID
override fun getHeaderTitle(finch: Finch) = title
companion object {
const val ID = "deviceInfo"
private const val DEFAULT_TITLE = "Device info"
private const val DEFAULT_SHOULD_SHOW_MANUFACTURER = true
private const val DEFAULT_SHOULD_SHOW_MODEL = true
private const val DEFAULT_SHOULD_SHOW_RESOLUTION_PX = true
private const val DEFAULT_SHOULD_SHOW_RESOLUTION_DP = true
private const val DEFAULT_SHOULD_SHOW_DENSITY = true
private const val DEFAULT_SHOULD_SHOW_ANDROID_VERSION = true
private const val DEFAULT_IS_EXPANDED_INITIALLY = false
}
}