Implement wear module base.

This commit is contained in:
Kacper Ziubryniewicz
2020-09-17 17:30:28 +02:00
parent 8e3d404352
commit 752cdfa8d6
36 changed files with 481 additions and 248 deletions

View File

@ -299,7 +299,7 @@ fun colorFromCssName(name: String): Int {
"orange" -> 0xffffa500
"black" -> 0xff000000
"white" -> 0xffffffff
else -> -1
else -> -1L
}.toInt()
}

View File

@ -152,13 +152,14 @@ class HomeFragment : Fragment(), CoroutineScope {
val items = mutableListOf<HomeCard>()
cards.mapNotNullTo(items) {
@Suppress("USELESS_CAST")
when (it.cardId) {
HomeCard.CARD_LUCKY_NUMBER -> HomeLuckyNumberCard(it.cardId, app, activity, this, app.profile)
HomeCard.CARD_TIMETABLE -> HomeTimetableCard(it.cardId, app, activity, this, app.profile)
HomeCard.CARD_GRADES -> HomeGradesCard(it.cardId, app, activity, this, app.profile)
HomeCard.CARD_EVENTS -> HomeEventsCard(it.cardId, app, activity, this, app.profile)
else -> null
}
} as HomeCard?
}
//if (App.devMode)
// items += HomeDebugCard(100, app, activity, this, app.profile)