I want to to decease he heigh of Outlined Text Field in jetpack compose. but when i add height(50) modifier then the text inside the OulinedTextField is cutting.
OutlinedTextField(
value = emailText,
onValueChange = { text -> emailText = text },
modifier = Modifier
.fillMaxWidth()
.height(50.dp)
.padding(horizontal = 16.dp)
.onFocusEvent {
coroutineScope.launch {
bringIntoViewRequester.bringIntoView()
}
},
shape = RoundedCornerShape(5.dp),
label = { Text(text = "Email Address") },
colors = TextFieldDefaults.textFieldColors(
textColor = Color.White,
focusedLabelColor = SignInTextColor,
unfocusedLabelColor = SignInTextColor,
focusedIndicatorColor = SignInTextColor,
unfocusedIndicatorColor = SignInTextColor,
containerColor = Color.Transparent
),
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Email,
imeAction = ImeAction.Next
)
)
I have tried to adjust padding but still not getting exact results. by changing text size it is working but i want my OutlinedTextField text size to 17.sp
I have tried to use BasicTextField he hight is decreasing but when i use lable then that lable then that label is inside the the border not aligning on top of the line.
I want my text fields hight to 50.dp and text inside OutlinedTextFields to aligned in vertical-center and text size should be 17.sp, without cutting any text beacuse of bottom padding.