Questions tagged [android-compose-textfield]

Material Design implementation in Jetpack compose of a TextField

242 questions
2
votes
1 answer

How to change border color of textfield in jetpack compose?

I am trying to give a border color for textfield in jetpack compose but I couldn't find information about textfield border color or layout color I just found about How to change layout or border color of outlinedtextfield. Is there a solution like…
2
votes
2 answers

Android Text is too wide when it contains long words

I want to display a text with an icon left to the text. The text and icon should be centered horizontally. Here is a composable function for this: Column(Modifier.fillMaxSize()) { Row( modifier =…
2
votes
1 answer

How to maintain cursor at the end in a Textfield after VisualTransformation in Jetpack Compose

I've a problem , I'm trying to generate a VisualTransformation (Custom) similar to credit card but after that the cursor left to stay at the end of text and can't be placed a the end of text anymore: Even if i try to move him to the end or add more…
2
votes
1 answer

How to Display text file (.txt) in jetpack compose

How to Display text file (.txt) in jetpack compose. Explanation: Need to show (.txt) file on the screen using Jetpack compose
2
votes
1 answer

Make Text Selectable using the Mouse

I want to make the Text selectable using the mouse similar to the TextField. SelectionContainer { Text( text = "Some very long text which can be selected by Mouse Left Press and drag to the right.", maxLines = 1, textAlign =…
2
votes
1 answer

Jetpack Compose: can't change TextField focus

So, I have an AlertDialog with a ListItem inside, which in turn has 2 TextFields inside: val keyboardController = LocalSoftwareKeyboardController.current val focusManager = LocalFocusManager.current val (nameFieldFocus, valueFieldFocus) =…
2
votes
1 answer

How to remove keyboard flicker when switching between TextFields?

I have a LazyColumn consisting of text fields with numeric input. When I switch between text fields, I sometimes see a flicker. It first opens the normal text keyboard and then switches to numeric one. This is leading to a really bad UX. My…
2
votes
2 answers

How to make TextField unclickable/unfocusable?

I have a simple OutlinedTextField with a label and text. By the design, it should not be focused and/or typeable. On the click event, the app should open a "picker" dialog and on a pick, the value of TextField should be updated. So, as a result, the…
2
votes
1 answer

Jetpack Compose: Textfield and FAB not using full width

I am trying to put a TextField and a FAB inside a bottomBar using Jetpack Compose. I wrapped the two with a box, which has the modifier "fillMaxWidth". But the two controls dont use the full width. Does anyone know, how to fix this issue? Here is my…
2
votes
1 answer

drawableStart equivalent in TextField of Jetpack compose

So I was checking out this document here https://developer.android.com/jetpack/compose/text#enter-modify-text I have managed to create a text field (EditText) Using: @Composable fun EmailField() { var text by remember {…
2
votes
1 answer

How can I disable FilledTextField component?

How can I disable FilledTextField component like a Button or something else? Are there some modifier or some wrapper to switch disable/enable state of UI components in Android Jetpack Compose?
1
vote
0 answers

Compose TextField startingText is not Updating When Remembered State Changes

In my app, the user can submit a form for a Person, and later on they can edit that form. This brings up a screen with multiple TextFields that are populated with the Person's info. I'm having an issue where when I edit one form and then go to edit…
1
vote
0 answers

How to trigger visual transformation upon focus prior to typing

Is there a way to trigger the VisualTransformation upon focus just prior to user typing? var text by remember { mutableStateOf("") } OutlinedTextField( modifier = modifier, value = text, onValueChange = { input -> text = input …
1
vote
0 answers

Date Picker implementation for Android Jetpack Compose

I am trying to create two composable functions: A text field that when clicked will open a popup menu that will allow the user to select a date(dd/mm/yy) The popup dialog that will allow to user to pick a day, month, and year I am trying to create…
1
vote
1 answer

Android Jetpack Compose cannot change BasicTextField cursor thumb color

Currently I'm working with android jetpack compose BasicTextField. And when I change cursor color, I expect the cursor handle to be changed with the same color as well. But it turns out with a different color. Is this a bug or I did set something…