diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 4f784fd..0ea52f9 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -21,8 +21,8 @@ android { applicationId = "com.ztftrue.music" minSdk = 30 targetSdk = 34 - versionCode = 14 - versionName = "0.1.14" + versionCode = 15 + versionName = "0.1.15" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { @@ -82,16 +82,16 @@ dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0") implementation("androidx.activity:activity-compose:1.8.2") - implementation(platform("androidx.compose:compose-bom:2023.10.01")) - implementation("androidx.navigation:navigation-compose:2.7.6") - implementation("androidx.media3:media3-exoplayer:1.2.1") + implementation(platform("androidx.compose:compose-bom:2024.04.00")) + implementation("androidx.navigation:navigation-compose:2.7.7") + implementation("androidx.media3:media3-exoplayer:1.3.1") implementation ("androidx.media:media:1.7.0") implementation("androidx.compose.ui:ui") implementation("androidx.compose.ui:ui-graphics") implementation("androidx.compose.ui:ui-tooling-preview") - implementation("androidx.compose.material3:material3:1.1.2") - implementation("androidx.compose.material3:material3-window-size-class:1.1.2") + implementation("androidx.compose.material3:material3:1.2.1") + implementation("androidx.compose.material3:material3-window-size-class:1.2.1") // splash implementation("androidx.core:core-splashscreen:1.0.1") @@ -105,7 +105,7 @@ dependencies { testImplementation("junit:junit:4.13.2") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - androidTestImplementation(platform("androidx.compose:compose-bom:2023.10.01")) + androidTestImplementation(platform("androidx.compose:compose-bom:2024.04.00")) androidTestImplementation("androidx.compose.ui:ui-test-junit4") debugImplementation("androidx.compose.ui:ui-tooling") debugImplementation("androidx.compose.ui:ui-test-manifest") diff --git a/app/src/main/java/com/ztftrue/music/ui/play/PlayingPage.kt b/app/src/main/java/com/ztftrue/music/ui/play/PlayingPage.kt index 29d0cfd..f285a54 100644 --- a/app/src/main/java/com/ztftrue/music/ui/play/PlayingPage.kt +++ b/app/src/main/java/com/ztftrue/music/ui/play/PlayingPage.kt @@ -41,7 +41,7 @@ import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Close import androidx.compose.material.icons.filled.MoreVert import androidx.compose.material3.Checkbox -import androidx.compose.material3.Divider +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -67,6 +67,7 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment +import androidx.compose.ui.ExperimentalComposeUiApi import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.drawBehind @@ -135,7 +136,7 @@ data class PlayingViewTab( @OptIn( - ExperimentalFoundationApi::class + ExperimentalFoundationApi::class, ExperimentalComposeUiApi::class ) @UnstableApi @Composable @@ -545,8 +546,7 @@ fun PlayingPage( IconButton( modifier = Modifier.width(50.dp), onClick = { - viewModel.fontSize.intValue = - viewModel.fontSize.intValue - 1 + viewModel.fontSize.intValue -= 1 SharedPreferencesUtils.saveFontSize( context, viewModel.fontSize.intValue @@ -568,8 +568,7 @@ fun PlayingPage( IconButton( modifier = Modifier.width(50.dp), onClick = { - viewModel.fontSize.intValue = - viewModel.fontSize.intValue + 1 + viewModel.fontSize.intValue += 1 SharedPreferencesUtils.saveFontSize( context, viewModel.fontSize.intValue @@ -786,7 +785,7 @@ fun PlayingPage( .padding(2.dp), color = MaterialTheme.colorScheme.onBackground ) - Divider( + HorizontalDivider( modifier = Modifier .fillMaxWidth() .height(1.dp) @@ -972,7 +971,7 @@ fun PlayingPage( color = MaterialTheme.colorScheme.onBackground ) } - Divider( + HorizontalDivider( modifier = Modifier .background(MaterialTheme.colorScheme.onBackground) .width(1.dp) @@ -1092,7 +1091,7 @@ fun PlayingPage( modifier = Modifier.fillMaxWidth(), indicator = { tabPositions -> if (tabPositions.isNotEmpty()) { - TabRowDefaults.Indicator( + TabRowDefaults.SecondaryIndicator( Modifier .height(3.0.dp) .tabIndicatorOffset(tabPositions[pagerTabState.currentPage]), @@ -1100,7 +1099,7 @@ fun PlayingPage( color = MaterialTheme.colorScheme.onBackground ) } else { - TabRowDefaults.Indicator( + TabRowDefaults.SecondaryIndicator( Modifier.height(3.0.dp), height = 3.0.dp, color = MaterialTheme.colorScheme.onBackground