Material Design implementation in Jetpack compose of a TextField
Questions tagged [android-compose-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…

NewPartizal
- 604
- 4
- 18
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 =…

Eugene.D
- 81
- 5
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…

Richard Víquez Pérez
- 210
- 2
- 9
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

Tippu Fisal Sheriff
- 2,177
- 11
- 19
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 =…

vovahost
- 34,185
- 17
- 113
- 116
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) =…

quicksc0p3r
- 23
- 4
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…

Arpit Shukla
- 9,612
- 1
- 14
- 40
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…

Demigod
- 5,073
- 3
- 31
- 49
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…

N0m4n904
- 123
- 2
- 13
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 {…

Mayur Gajra
- 8,285
- 6
- 25
- 41
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?

Constantin
- 699
- 5
- 9
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…

pjp94
- 13
- 3
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
…

z.g.y
- 5,512
- 4
- 10
- 36
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…

nikoparas1
- 21
- 1
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…

TRose
- 302
- 3
- 16