Questions tagged [android-compose-textfield]

Material Design implementation in Jetpack compose of a TextField

242 questions
0
votes
1 answer

How to make growing Text Composable scrollable at specific text length?

Is it possible to make a growing Text Composable physically scrollable when the text reaches a specific length instead of this happening only when it reaches its container bounds? I want to allow the user to physically scroll the Text Composable…
0
votes
2 answers

java.lang.NumberFormatException: multiple points with KeyboardType.Decimal

I'm using KeyboardType.Decimal for the keyboard type in the keyboardOptions entry shown below for an OutlinedTextField, but it's allowing multiple decimals in the typed number. And doing any conversions on such an input like "2.5.8".toDouble()…
0
votes
1 answer

How to change textstyle to Material headline?

How to changes text style Material headline? Text("Lorem Ipsum", style = TextStyle() // ???? ) thanks
0
votes
0 answers

Skipping of inputs if user types fast

I am trying to create otp view where each item is individually editable, problem arises when user types fast, the input is skipped. I believe there is some delay in focus manager. Below is the code, let me know if there is any issues in the snippet…
0
votes
1 answer

Compose BasicTextField trailingIcon stretches the heigh of the field

I ran into an issue today where if I specify a trailing icon for a BasicTextField it forces the height of the field to be increased. Any way to override this setting? As you can see in the image the 555g field is shorter than the Ingredient1 which…
0
votes
2 answers

how to make Parralel scroll in jetpack compose?

I am makeing a profile screen in jetpack compose I want to make the Blue background behind the image scroll up when the image is scrolled up because it doesn't look good :) This is what I need help with, see the gif to understand better. how can I…
0
votes
0 answers

How can I fix location of my OutLineTextField in compose?

I'm trying to add an outlinetextfield to my screen in compose, but for some reason it always appears at the bottom. I couldn't solve this situation? Also, as a second question, I have two dropwdown menus and clicking either one always opens the list…
0
votes
0 answers

is there a way to change TextOverflow.Ellipsis or maxLines, dynamically depending on the view size?

is there a way to use overflow = TextOverflow.Ellipsis dynamically depending on the view size? I am trying to implement this screen that I designed in Figma my problem is with the More Information Section. I used Text object with the attribute…
0
votes
1 answer

Jetpack compose not showing bitmap image for very high quality image

When image bitmap is low quality I am able to load and display the image with coil but when image bitmap is very high quality the screen doesn't show anything and pressing back lets to crash the app. I tried bitmap instead the painter but same…
0
votes
1 answer

Center and Start text in jetpack compose

How can I put the text in the center of the total clickable area and still in the start of the component? Like an android:layout_gravity="center" with margin.
0
votes
0 answers

How to handle state in compose if you have TextFields in LazyColumn?

I've a list of QA(String,String) where each list item represents 2 TextFields in Lazycolumn, I tried several things but my TextFields value is not updating. I tried mutableStateListOf() , mutableStateOf() , I'm passing the QA(String) value to the…
0
votes
1 answer

Visual transformation for currency in compose

I would like to create a mask for TextField as $ NNNNNNNNNNNNNNNNNNNNN Where is the issue in my code? How to do it better? It does not erease all of the characters class CurrencyMaskTransformation : VisualTransformation { override fun…
0
votes
1 answer

What is the proper way to update TextField string value after successfully loading data to pre-fill the TextField from database?

I am using Jetpack Compose, and it has occurred to me that I may be doing this incorrectly. Suppose we have a screen that allows us to edit a form's data, which has been saved locally using Room. Currently, I follow this rough outline: In my…
0
votes
0 answers

Jetpack Compose Text size dp in Huge font

I want to set text size as "DP". so I add extension fuction like below @Composable fun Dp.toTextDp(): TextUnit = textSp(density = LocalDensity.current) private fun Dp.textSp(density: Density): TextUnit = with(density) { …
0
votes
1 answer

Handle properly number in Jetpack Compose

How can I properly handle number in text component in jetpack compose (with MVVM pattern) Please note that the price can be null or have a value (maybe 0 btw) I have a poor implementation for now, I changed the keyboard like this : …
P. Sohm
  • 2,842
  • 2
  • 44
  • 77