Update Kotlin and Jetpack Compose
This commit is contained in:
@@ -23,6 +23,7 @@ import de.mm20.launcher2.ui.component.BottomSheetDialog
|
||||
import de.mm20.launcher2.ui.component.SmallMessage
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun WeatherLocationSearchDialog(
|
||||
onDismissRequest: () -> Unit
|
||||
|
||||
@@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.CornerSize
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.material3.CenterAlignedTopAppBar
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Surface
|
||||
import androidx.compose.runtime.*
|
||||
@@ -28,7 +29,9 @@ import de.mm20.launcher2.ui.ktx.toDp
|
||||
import de.mm20.launcher2.ui.ktx.toPixels
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterialApi::class)
|
||||
@OptIn(ExperimentalComposeUiApi::class, ExperimentalMaterialApi::class,
|
||||
ExperimentalMaterial3Api::class
|
||||
)
|
||||
@Composable
|
||||
fun BottomSheetDialog(
|
||||
onDismissRequest: () -> Unit,
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.compose.ui.unit.dp
|
||||
import com.godaddy.android.colorpicker.ClassicColorPicker
|
||||
import de.mm20.launcher2.ui.ktx.toHexString
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun ColorPreference(
|
||||
title: String,
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
package de.mm20.launcher2.ui.component.preferences
|
||||
|
||||
import androidx.compose.material3.OutlinedTextField
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.material3.AlertDialog
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.res.stringResource
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun TextPreference(
|
||||
title: String,
|
||||
|
||||
@@ -48,7 +48,8 @@ import de.mm20.launcher2.ui.utils.rememberNotificationShadeController
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@OptIn(
|
||||
ExperimentalMaterialApi::class, ExperimentalFoundationApi::class
|
||||
ExperimentalMaterialApi::class, ExperimentalFoundationApi::class,
|
||||
ExperimentalMaterial3Api::class
|
||||
)
|
||||
@Composable
|
||||
fun PagerScaffold(
|
||||
|
||||
@@ -45,7 +45,7 @@ import de.mm20.launcher2.ui.modifier.verticalFadingEdges
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlin.math.roundToInt
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@OptIn(ExperimentalFoundationApi::class, ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun PullDownScaffold(
|
||||
modifier: Modifier = Modifier,
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ import de.mm20.launcher2.ui.ktx.toPixels
|
||||
import de.mm20.launcher2.ui.locals.LocalGridColumns
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun CustomizeSearchableSheet(
|
||||
searchable: Searchable,
|
||||
|
||||
@@ -36,7 +36,7 @@ fun LicenseScreen(library: OpenSourceLibrary) {
|
||||
val scrollBehavior =
|
||||
TopAppBarDefaults.exitUntilCollapsedScrollBehavior(
|
||||
rememberSplineBasedDecay(),
|
||||
rememberTopAppBarScrollState()
|
||||
rememberTopAppBarState()
|
||||
)
|
||||
Scaffold(
|
||||
topBar = {
|
||||
|
||||
@@ -431,6 +431,7 @@ fun EditWebsearchDialog(
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
private fun ColorPicker(
|
||||
value: Int,
|
||||
|
||||
Reference in New Issue
Block a user