diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 21d1cf9a..c34a6474 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -4,6 +4,8 @@ plugins { id("kotlin-parcelize") } +val composeVersion = "1.1.0-beta04" + android { compileSdk = 31 @@ -49,7 +51,7 @@ android { } composeOptions { - kotlinCompilerExtensionVersion = "1.1.0-alpha06" + kotlinCompilerExtensionVersion = composeVersion } } @@ -82,7 +84,7 @@ dependencies { // AndroidX implementation("androidx.core:core-ktx:1.7.0") - implementation("androidx.appcompat:appcompat:1.3.1") + implementation("androidx.appcompat:appcompat:1.4.0") implementation("androidx.browser:browser:1.4.0") implementation("androidx.preference:preference-ktx:1.1.1") implementation("androidx.activity:activity-compose:1.4.0") @@ -92,13 +94,12 @@ dependencies { implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion") // Compose - val composeVersion = "1.1.0-beta03" implementation("androidx.compose.compiler:compiler:$composeVersion") implementation("androidx.compose.foundation:foundation:$composeVersion") implementation("androidx.compose.material:material-icons-core:$composeVersion") implementation("androidx.compose.material:material-icons-extended:$composeVersion") implementation("androidx.compose.material:material:$composeVersion") - implementation("androidx.compose.material3:material3:1.0.0-alpha01") + implementation("androidx.compose.material3:material3:1.0.0-alpha02") implementation("androidx.compose.runtime:runtime-livedata:$composeVersion") implementation("androidx.compose.ui:ui-tooling:$composeVersion") implementation("androidx.compose.ui:ui-util:$composeVersion") diff --git a/app/src/main/java/com/vanced/manager/ui/component/layout/ManagerScaffold.kt b/app/src/main/java/com/vanced/manager/ui/component/layout/ManagerScaffold.kt index 6a9fc88f..b54594e4 100644 --- a/app/src/main/java/com/vanced/manager/ui/component/layout/ManagerScaffold.kt +++ b/app/src/main/java/com/vanced/manager/ui/component/layout/ManagerScaffold.kt @@ -9,7 +9,6 @@ import androidx.compose.ui.Modifier @Composable fun ManagerScaffold( modifier: Modifier = Modifier, - scaffoldState: ScaffoldState = rememberScaffoldState(), topBar: @Composable () -> Unit = {}, floatingActionButton: @Composable () -> Unit = {}, floatingActionButtonPosition: FabPosition = FabPosition.End, @@ -22,7 +21,6 @@ fun ManagerScaffold( // ) { Scaffold( modifier = modifier, - scaffoldState = scaffoldState, topBar = topBar, floatingActionButton = floatingActionButton, floatingActionButtonPosition = floatingActionButtonPosition, diff --git a/app/src/main/java/com/vanced/manager/ui/widget/list/CheckboxItem.kt b/app/src/main/java/com/vanced/manager/ui/widget/list/CheckboxItem.kt index e61695f2..9f16f5a4 100644 --- a/app/src/main/java/com/vanced/manager/ui/widget/list/CheckboxItem.kt +++ b/app/src/main/java/com/vanced/manager/ui/widget/list/CheckboxItem.kt @@ -1,15 +1,13 @@ package com.vanced.manager.ui.widget.list -import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material3.Checkbox import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp import com.vanced.manager.ui.component.color.managerTextColor import com.vanced.manager.ui.component.list.ManagerSelectableListItem import com.vanced.manager.ui.component.modifier.managerClickable import com.vanced.manager.ui.component.text.ManagerText -import com.vanced.manager.ui.widget.checkbox.ManagerAnimatedCheckbox @Composable fun CheckboxItem( @@ -31,13 +29,12 @@ fun CheckboxItem( ) }, trailing = { - ManagerAnimatedCheckbox( - size = 24.dp, - shape = CircleShape, - isChecked = isChecked - ) { - toggle() - } + Checkbox( + checked = isChecked, + onCheckedChange = { + toggle() + } + ) } ) } \ No newline at end of file diff --git a/app/src/main/java/com/vanced/manager/ui/widget/list/RadiobuttonItem.kt b/app/src/main/java/com/vanced/manager/ui/widget/list/RadiobuttonItem.kt index 58619e0c..3cc8c234 100644 --- a/app/src/main/java/com/vanced/manager/ui/widget/list/RadiobuttonItem.kt +++ b/app/src/main/java/com/vanced/manager/ui/widget/list/RadiobuttonItem.kt @@ -1,15 +1,13 @@ package com.vanced.manager.ui.widget.list -import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.RadioButton import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.unit.dp import com.vanced.manager.ui.component.color.managerTextColor import com.vanced.manager.ui.component.list.ManagerSelectableListItem import com.vanced.manager.ui.component.modifier.managerClickable import com.vanced.manager.ui.component.text.ManagerText -import com.vanced.manager.ui.widget.radiobutton.ManagerAnimatedRadiobutton @Composable fun RadiobuttonItem( @@ -31,10 +29,8 @@ fun RadiobuttonItem( ) }, trailing = { - ManagerAnimatedRadiobutton( - size = 24.dp, - shape = CircleShape, - isSelected = isSelected, + RadioButton( + selected = isSelected, onClick = onClick ) } diff --git a/build.gradle.kts b/build.gradle.kts index a057b512..50c0d25f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ buildscript { mavenCentral() } - val kotlinVersion = "1.5.31" + val kotlinVersion = "1.6.0" dependencies { classpath("com.android.tools.build:gradle:7.0.3") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")