mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-09 22:04:24 +01:00
adjust search component width
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
ebe374c9cb
commit
e689e4f7f8
@ -86,7 +86,8 @@ fun AppBar(
|
||||
onUpdateSearchQuery(searchQuery)
|
||||
onUpdateAutocompleteUsers()
|
||||
},
|
||||
onDisableSearch = onDisableSearch
|
||||
onDisableSearch = onDisableSearch,
|
||||
isAddParticipants = isAddParticipants
|
||||
)
|
||||
|
||||
if (searchQuery.isNotEmpty() && isAddParticipants) {
|
||||
@ -99,6 +100,7 @@ fun AppBar(
|
||||
) {
|
||||
Text(text = context.getString(R.string.add_participants))
|
||||
}
|
||||
} else {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,12 +34,21 @@ import androidx.compose.ui.unit.sp
|
||||
import com.nextcloud.talk.R
|
||||
|
||||
@Composable
|
||||
fun SearchComponent(text: String, onTextChange: (String) -> Unit, onDisableSearch: () -> Unit) {
|
||||
fun SearchComponent(
|
||||
text: String,
|
||||
onTextChange: (String) -> Unit,
|
||||
onDisableSearch: () -> Unit,
|
||||
isAddParticipants: Boolean
|
||||
) {
|
||||
var width_ratio = 0.85f
|
||||
if (!isAddParticipants) {
|
||||
width_ratio = 1.0f
|
||||
}
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
TextField(
|
||||
modifier = Modifier
|
||||
.background(MaterialTheme.colorScheme.background)
|
||||
.fillMaxWidth(SearchComponentCompanionClass.WIDTH_RATIO)
|
||||
.fillMaxWidth(width_ratio)
|
||||
.height(60.dp),
|
||||
value = text,
|
||||
onValueChange = { onTextChange(it) },
|
||||
|
Loading…
Reference in New Issue
Block a user