phone typing bar sits on the keyboard, close on the left and search on the right

This commit is contained in:
Seb3thehacker committed 2026-10-05 17:03:43 -07:00
1 parent dc550ab735
commit 1127d4baf7
2 files changed
+7 -2

No files matched your search

+1
View File
@@ -125,6 +125,7 @@
android:name=".GearslipActivity"
android:exported="true"
android:launchMode="singleTop"
android:windowSoftInputMode="adjustResize"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|uiMode|density|locale|layoutDirection|fontScale">
<intent-filter>
@@ -8,6 +8,7 @@ import androidx.compose.foundation.text.KeyboardActions
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
@@ -47,6 +48,9 @@ fun PhoneTypingBar(modifier: Modifier = Modifier) {
Surface(color = MaterialTheme.colorScheme.surfaceContainerHigh, modifier = modifier.fillMaxWidth().imePadding()) {
Row(Modifier.padding(horizontal = 12.dp, vertical = 8.dp), verticalAlignment = Alignment.CenterVertically) {
IconButton(onClick = PhoneTyping::dismiss) {
Icon(Icons.Filled.Close, contentDescription = "Close the car keyboard")
}
OutlinedTextField(
value = value,
onValueChange = {
@@ -59,8 +63,8 @@ fun PhoneTypingBar(modifier: Modifier = Modifier) {
keyboardActions = KeyboardActions(onSearch = { PhoneTyping.submit() }),
modifier = Modifier.weight(1f).focusRequester(focus),
)
IconButton(onClick = PhoneTyping::dismiss) {
Icon(Icons.Filled.Close, contentDescription = "Close the car keyboard")
IconButton(onClick = PhoneTyping::submit) {
Icon(Icons.Filled.Search, contentDescription = "Search on the car screen")
}
}
}