AndroidAPS/app/src/main/java/info/nightscout/androidaps/skins/SkinLargeDisplay.kt
2020-05-31 12:02:42 +02:00

23 lines
909 B
Kotlin

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 && isTablet -> R.layout.overview_fragment_nsclient_tablet
config.NSCLIENT -> R.layout.overview_fragment_nsclient
isSmallHeight || isLandscape -> R.layout.overview_fragment_landscape
else -> R.layout.overview_fragment
}
}