Questions tagged [android-compose-textfield]

Material Design implementation in Jetpack compose of a TextField

242 questions
0
votes
1 answer

How to check user name and last name length in one textfield in android jetpack compose?

There is an outlinedtextfield where the user enters his/her name and surname, and this outlinetextfield enters the user name and surname, but if the user's name and surname are less than 3 characters, I want to make the border of the…
0
votes
1 answer

Why is my MutableState value reset inside LaunchedEffect

I am trying to learn android programming with kotlin jetpack compose and am making a chatting app. However, I cant seem to pass my TextField value after pressing the send button. I am using a custom clickable function which I define like…
0
votes
1 answer

Aligning multiple texts center if one is null

I want to align two texts to be centered vertically to the start of the TaskCard. It works as intended if there are two texts present. However, if there is only one and the other one is null the null one will completely disappear, but will still…
Juncu
  • 3,704
  • 4
  • 7
  • 27
0
votes
0 answers

Android Compose scroll up after focus on BasicTextField

I'm using BasicTextField to stylize my text input field. I'm having a problem where when I focus on said text input on the lower part of the screen, keyboard overlaps my input a bit. Is there a way to fix it ? Here's my BasicTextField Row( …
0
votes
2 answers

How can I run validation when my users exit textField in compose?

I have a function that will check if my textField has any issues fun hasError(textFieldLabel: String):Boolean{} I want this function to run only when the user has finished entering text. When the user exists the text field, we assume they're…
0
votes
1 answer

Get the value from VisualTransformation Jetpack Compose TextField

How can I get the transformed value from VisualTransformation in Jetpack compose TextField? since the only thing that is changing is the visual text not the actual input/buffered text? class CurrencyAmountInputVisualTransformation( private val…
0
votes
1 answer

How to make a Text which will scroll its content automatically horizontally while content is longer than size in android jetpack compose? Like Marque

How to make a Text or TextField which will scroll its content automatically horizontally while content is longer than size in android jetpack compose? Like horizontal Marque I know that I can use: modifier =…
0
votes
0 answers

Padding for Text() within Column not working?

I have a Jetpack Compose composable in a column beginning with a icon, title, textbody and a pager row: Box(modifier = Modifier .fillMaxSize() .background(color = TVTheme.colors.blue) ) { val bigPadding = 334.dp val smallPadding = 24.dp …
0
votes
1 answer

TextField value is not set to empty string despite setting empty state value

My shopping list item Quantity TextField allows a decimal point, and if the user types a decimal as the first character like ".42", it throws an NumberFormatException when I cast the TextField string to a Double in the code below. To prevent the…
0
votes
1 answer

Text in Box Composable aligns left despite Alignment.Center

I want the AnnotatedString in the Box Composable below to display in the middle of the screen and centered, but the text is aligned to the left, although it displays in the middle of the screen. How can I fix this? Box( modifier =…
0
votes
0 answers

How to change Copy Paste Menu Color in EditText for Android Jetpack Compose

I set my background color in android:Theme.Material.Light.NoActionBar to purple #4B367C Now that purple is also reflecting in Copy/past menu making it unreadable Any way to explicitly set the color for…
0
votes
1 answer

How to create a dynamic views in jetpack compose

I am trying to create a some dynamic views when the user clicks add button it starts a new set of text fields and fill the required details and add all the set to final list of array i facing a problem of how to deal with the mutable state of each…
0
votes
1 answer

How to add compose views dynamically

I am trying to add a some text fields compose dynamically. when clicking a add button a new compose fields appear and add some required texts my problem is text fields changes for all the layouts instead of the particular one. how can use the…
0
votes
1 answer

How to make too bold text in jetpack compose?

While using Jetpack Compose Text() I am not able to change the fontWeight more than FontWeight.W600 and FontWeight.W500. Others than these two none gets applied like FontWeight.W700, FontWeight.Bold , FontWeight(550) etc. I was trying to create text…
0
votes
1 answer

Text Field Gradient Border On Focus Jetpack Compose?

I am trying to change a gradient border on the input focus. The example below is what I want to achieve, but how can I make 'focusedBorderColor' into a gradient border? colors = TextFieldDefaults.outlinedTextFieldColors( …