From 666542ce171da529985e2c807cd53a3ff5c63eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=86=9C=E9=98=BF=E6=A5=A0?= Date: Wed, 14 Oct 2026 14:40:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2=E4=B8=BA?= =?UTF-8?q?=20MaterialExpressiveTheme=EF=BC=8C=E5=85=A8=E5=B1=80=E5=90=AF?= =?UTF-8?q?=E7=94=A8=20Expressive=20=E5=BC=B9=E7=B0=A7=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/cn/airnan/a2fair/ui/theme/Theme.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/cn/airnan/a2fair/ui/theme/Theme.kt b/app/src/main/java/cn/airnan/a2fair/ui/theme/Theme.kt index 890f0c6..6e64e42 100644 --- a/app/src/main/java/cn/airnan/a2fair/ui/theme/Theme.kt +++ b/app/src/main/java/cn/airnan/a2fair/ui/theme/Theme.kt @@ -6,7 +6,10 @@ import android.content.ContextWrapper import android.os.Build import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.material3.ColorScheme +import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi +import androidx.compose.material3.MaterialExpressiveTheme import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.MotionScheme import androidx.compose.material3.darkColorScheme import androidx.compose.material3.dynamicDarkColorScheme import androidx.compose.material3.dynamicLightColorScheme @@ -115,6 +118,7 @@ tailrec fun Context.findActivity(): Activity? = when (this) { else -> null } +@OptIn(ExperimentalMaterial3ExpressiveApi::class) @Composable fun _2FAirTheme( themeMode: Int = 0, // 0: System, 1: Light, 2: Dark @@ -147,8 +151,9 @@ fun _2FAirTheme( } } - MaterialTheme( + MaterialExpressiveTheme( colorScheme = colorScheme, + motionScheme = MotionScheme.expressive(), typography = Typography, content = content )