Resolve review comments for BrowseSourceScreens (#7912)

This commit is contained in:
Andreas
2022-08-31 22:47:07 +02:00
committed by GitHub
parent 504844a892
commit 2f26982e34
8 changed files with 56 additions and 71 deletions

View File

@@ -7,6 +7,8 @@ import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.Close
@@ -220,6 +222,8 @@ fun AppBarActions(
fun SearchToolbar(
searchQuery: String,
onChangeSearchQuery: (String) -> Unit,
keyboardOptions: KeyboardOptions = KeyboardOptions.Default,
keyboardActions: KeyboardActions = KeyboardActions.Default,
onClickCloseSearch: () -> Unit,
onClickResetSearch: () -> Unit,
incognitoMode: Boolean = false,
@@ -236,6 +240,8 @@ fun SearchToolbar(
.fillMaxWidth()
.focusRequester(focusRequester),
textStyle = MaterialTheme.typography.bodyMedium.copy(color = MaterialTheme.colorScheme.onBackground),
keyboardOptions = keyboardOptions,
keyboardActions = keyboardActions,
singleLine = true,
cursorBrush = SolidColor(MaterialTheme.colorScheme.onBackground),
)