From 40b524830245b10b628e7199cb147052be860c28 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 18 Jun 2023 13:54:59 +0200 Subject: [PATCH] Replace deprecated method `TextFieldDefaults.textFieldColors` ``` TextFieldColors' is deprecated. Renamed to `TextFieldDefaults.colors` with additional parameters to controlcontainer color based on state. ``` --- .../samples/apps/nowinandroid/feature/search/SearchScreen.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt b/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt index cb48bffe3..dc5ee45a8 100644 --- a/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt +++ b/feature/search/src/main/java/com/google/samples/apps/nowinandroid/feature/search/SearchScreen.kt @@ -39,7 +39,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.ClickableText import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.MaterialTheme @@ -450,7 +449,7 @@ private fun SearchToolbar( } } -@OptIn(ExperimentalMaterial3Api::class, ExperimentalComposeUiApi::class) +@OptIn(ExperimentalComposeUiApi::class) @Composable private fun SearchTextField( onSearchQueryChanged: (String) -> Unit, @@ -466,7 +465,7 @@ private fun SearchTextField( } TextField( - colors = TextFieldDefaults.textFieldColors( + colors = TextFieldDefaults.colors( focusedIndicatorColor = Color.Transparent, unfocusedIndicatorColor = Color.Transparent, disabledIndicatorColor = Color.Transparent,