Update Jetpack Compose and Accompanist
This commit is contained in:
parent
19ae7e07e6
commit
c9e093bb9b
@ -61,7 +61,7 @@ dependencyResolutionManagement {
|
||||
listOf("kotlin.stdlib", "kotlinx.coroutines.core", "kotlinx.coroutines.android")
|
||||
)
|
||||
|
||||
version("androidx.compose", "1.2.0-alpha06")
|
||||
version("androidx.compose", "1.2.0-alpha07")
|
||||
alias("androidx.compose.runtime")
|
||||
.to("androidx.compose.runtime", "runtime")
|
||||
.versionRef("androidx.compose")
|
||||
@ -94,7 +94,7 @@ dependencyResolutionManagement {
|
||||
.versionRef("androidx.compose")
|
||||
alias("androidx.compose.material3")
|
||||
.to("androidx.compose.material3", "material3")
|
||||
.version("1.0.0-alpha08")
|
||||
.version("1.0.0-alpha09")
|
||||
|
||||
version("androidx.lifecycle", "2.4.1")
|
||||
alias("androidx.lifecycle.viewmodel")
|
||||
@ -122,7 +122,7 @@ dependencyResolutionManagement {
|
||||
)
|
||||
)
|
||||
|
||||
version("accompanist", "0.24.4-alpha")
|
||||
version("accompanist", "0.24.6-alpha")
|
||||
alias("accompanist.insets")
|
||||
.to("com.google.accompanist", "accompanist-insets")
|
||||
.versionRef("accompanist")
|
||||
|
||||
@ -2,8 +2,8 @@ package de.mm20.launcher2.ui.component.preferences
|
||||
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.Switch
|
||||
import androidx.compose.material.SwitchDefaults
|
||||
import androidx.compose.material3.Switch
|
||||
import androidx.compose.material3.SwitchDefaults
|
||||
import androidx.compose.material3.LocalContentColor
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
@ -48,12 +48,7 @@ fun PreferenceWithSwitch(
|
||||
modifier = Modifier.padding(horizontal = 16.dp),
|
||||
checked = switchValue,
|
||||
enabled = enabled,
|
||||
onCheckedChange = onSwitchChanged,
|
||||
colors = SwitchDefaults.colors(
|
||||
uncheckedThumbColor = MaterialTheme.colorScheme.onSurface,
|
||||
checkedThumbColor = MaterialTheme.colorScheme.primary,
|
||||
checkedTrackColor = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
onCheckedChange = onSwitchChanged
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
package de.mm20.launcher2.ui.component.preferences
|
||||
|
||||
import androidx.compose.material.Switch
|
||||
import androidx.compose.material.SwitchDefaults
|
||||
import androidx.compose.material3.Switch
|
||||
import androidx.compose.material3.SwitchDefaults
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
@ -26,11 +26,6 @@ fun SwitchPreference(
|
||||
controls = {
|
||||
Switch(
|
||||
enabled = enabled, checked = value, onCheckedChange = onValueChanged,
|
||||
colors = SwitchDefaults.colors(
|
||||
uncheckedThumbColor = MaterialTheme.colorScheme.onSurface,
|
||||
checkedThumbColor = MaterialTheme.colorScheme.primary,
|
||||
checkedTrackColor = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user