mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 00:12:24 +01:00
phone typing bar sits on the keyboard, close on the left and search on the right
This commit is contained in:
1 parent
dc550ab735
commit
1127d4baf7
2 files changed
+7
-2
No files matched your search
@@ -125,6 +125,7 @@
|
|||||||
android:name=".GearslipActivity"
|
android:name=".GearslipActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleTop"
|
||||||
|
android:windowSoftInputMode="adjustResize"
|
||||||
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|uiMode|density|locale|layoutDirection|fontScale">
|
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboardHidden|uiMode|density|locale|layoutDirection|fontScale">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import androidx.compose.foundation.text.KeyboardActions
|
|||||||
import androidx.compose.foundation.text.KeyboardOptions
|
import androidx.compose.foundation.text.KeyboardOptions
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.filled.Close
|
import androidx.compose.material.icons.filled.Close
|
||||||
|
import androidx.compose.material.icons.filled.Search
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
import androidx.compose.material3.IconButton
|
import androidx.compose.material3.IconButton
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
@@ -47,6 +48,9 @@ fun PhoneTypingBar(modifier: Modifier = Modifier) {
|
|||||||
|
|
||||||
Surface(color = MaterialTheme.colorScheme.surfaceContainerHigh, modifier = modifier.fillMaxWidth().imePadding()) {
|
Surface(color = MaterialTheme.colorScheme.surfaceContainerHigh, modifier = modifier.fillMaxWidth().imePadding()) {
|
||||||
Row(Modifier.padding(horizontal = 12.dp, vertical = 8.dp), verticalAlignment = Alignment.CenterVertically) {
|
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(
|
OutlinedTextField(
|
||||||
value = value,
|
value = value,
|
||||||
onValueChange = {
|
onValueChange = {
|
||||||
@@ -59,8 +63,8 @@ fun PhoneTypingBar(modifier: Modifier = Modifier) {
|
|||||||
keyboardActions = KeyboardActions(onSearch = { PhoneTyping.submit() }),
|
keyboardActions = KeyboardActions(onSearch = { PhoneTyping.submit() }),
|
||||||
modifier = Modifier.weight(1f).focusRequester(focus),
|
modifier = Modifier.weight(1f).focusRequester(focus),
|
||||||
)
|
)
|
||||||
IconButton(onClick = PhoneTyping::dismiss) {
|
IconButton(onClick = PhoneTyping::submit) {
|
||||||
Icon(Icons.Filled.Close, contentDescription = "Close the car keyboard")
|
Icon(Icons.Filled.Search, contentDescription = "Search on the car screen")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user