[慢讯] 斯世已无对,寰宇独称雄!Vitality夺冠布达佩斯Major
This commit is contained in:
@@ -5,6 +5,7 @@ import androidx.compose.runtime.Composable
|
|||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.foundation.isSystemInDarkTheme
|
import androidx.compose.foundation.isSystemInDarkTheme
|
||||||
|
|
||||||
|
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||||
@Composable
|
@Composable
|
||||||
fun AppTheme(
|
fun AppTheme(
|
||||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||||
@@ -12,7 +13,7 @@ fun AppTheme(
|
|||||||
content: @Composable () -> Unit
|
content: @Composable () -> Unit
|
||||||
) {
|
) {
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
|
val motionScheme = MotionScheme.expressive()
|
||||||
val colorScheme = when {
|
val colorScheme = when {
|
||||||
dynamicColor && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S ->
|
dynamicColor && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S ->
|
||||||
if (darkTheme) dynamicDarkColorScheme(context)
|
if (darkTheme) dynamicDarkColorScheme(context)
|
||||||
@@ -22,9 +23,10 @@ fun AppTheme(
|
|||||||
else -> lightColorScheme()
|
else -> lightColorScheme()
|
||||||
}
|
}
|
||||||
|
|
||||||
MaterialTheme(
|
MaterialExpressiveTheme(
|
||||||
colorScheme = colorScheme,
|
colorScheme = colorScheme,
|
||||||
typography = AppTypography,
|
typography = AppTypography,
|
||||||
|
motionScheme = motionScheme,
|
||||||
shapes = AppShapes,
|
shapes = AppShapes,
|
||||||
content = content
|
content = content
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user