mirror of
https://github.com/AdrianKuta/KahootQuiz.git
synced 2025-09-14 17:24:21 +02:00
Compare commits
3 Commits
34b026ec94
...
75d1ce86eb
Author | SHA1 | Date | |
---|---|---|---|
![]() |
75d1ce86eb | ||
![]() |
d6e77be660 | ||
![]() |
b454701566 |
@@ -82,13 +82,6 @@ If you prefer the command line: `./gradlew assembleDebug` and then install the g
|
||||
- Consider support for additional media types (video/audio), with graceful fallbacks.
|
||||
5. Transitions between questions could be more smooth.
|
||||
|
||||
## What I’m Happy About
|
||||
|
||||
- I created and used convention plugins to reuse modules configuration.
|
||||
- The architecture is clean with multi-modularity and separation of concerns.
|
||||
- I leaned into Kotlin ‘sugar’ where it helps readability and conciseness — I love it.
|
||||
- Configured `Detekt` for static code analysis
|
||||
|
||||
## Extra: Related Work I Can Share
|
||||
|
||||
I can share more complex code from my private app that is published on the Google Play Store.
|
||||
|
@@ -1,20 +1,9 @@
|
||||
package dev.adriankuta.kahootquiz.core.designsystem
|
||||
|
||||
import android.os.Build
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.dynamicDarkColorScheme
|
||||
import androidx.compose.material3.dynamicLightColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
|
||||
private val DarkColorScheme = darkColorScheme(
|
||||
primary = Purple80,
|
||||
secondary = PurpleGrey80,
|
||||
tertiary = Pink80,
|
||||
)
|
||||
|
||||
private val LightColorScheme = lightColorScheme(
|
||||
primary = Purple40,
|
||||
@@ -29,18 +18,8 @@ fun KahootQuizTheme(
|
||||
dynamicColor: Boolean = true,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
val colorScheme = when {
|
||||
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
|
||||
val context = LocalContext.current
|
||||
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
||||
}
|
||||
|
||||
darkTheme -> DarkColorScheme
|
||||
else -> LightColorScheme
|
||||
}
|
||||
|
||||
MaterialTheme(
|
||||
colorScheme = colorScheme,
|
||||
colorScheme = LightColorScheme,
|
||||
typography = Typography,
|
||||
content = content,
|
||||
)
|
||||
|
Reference in New Issue
Block a user