AndroidAPS/app/src/main/java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt

22 lines
822 B
Kotlin
Raw Normal View History

2020-05-31 12:02:42 +02:00
package info.nightscout.androidaps.skins
import info.nightscout.androidaps.Config
import info.nightscout.androidaps.R
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class SkinLargeDisplay @Inject constructor(private val config: Config): SkinInterface {
override val description: Int get() = R.string.largedisplay_description
override val mainGraphHeight: Int get() = 400
override val secondaryGraphHeight: Int get() = 150
override fun overviewLayout(isLandscape: Boolean, isTablet: Boolean, isSmallHeight: Boolean): Int =
when {
config.NSCLIENT -> R.layout.overview_fragment_nsclient
isSmallHeight || isLandscape -> R.layout.overview_fragment_landscape
else -> R.layout.overview_fragment
}
}