Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
116 views

I want to use state based TextField. I've learned that to use a state-based TextField, I must change the bom version to alpha. How can I change the bom version to alpha in libs.versions.toml? [...
Jorpy's user avatar
  • 529
1 vote
1 answer
290 views

Here is my code: Components.kt package com.example.jettipapp.components import androidx.compose.foundation.text.KeyboardActions import androidx.compose.foundation.text.KeyboardOptions import androidx....
Aadvik's user avatar
  • 1,522
0 votes
1 answer
96 views

I want to use SearchBar from Compose, but I need to set another height. However, the problem is that if I do this, then the EditText inside & all the content would remain fixed at the top. I need ...
radus14's user avatar
  • 180
1 vote
1 answer
384 views

With the code provided in Kotlin documentation, I'm getting the following error when implementing a TextField: val state = rememberTextFieldState("Initial text", TextRange(0, 12)) TextField(...
mfusco's user avatar
  • 51
1 vote
1 answer
113 views

How can I set a character limit in a BasicTextField (or BasicTextField2) in Jetpack Compose? With the new BasicTextField function, which uses a state: TextFieldState as a parameter, it is no longer ...
Rulogarcillan's user avatar
0 votes
1 answer
131 views

I want to disable capitalization on my OutlinedTextField that i want to be of an email type. Obviously this email type should have capitalization disabled. So here is what I tried and with no effect (...
Jawegiel's user avatar
  • 131
0 votes
1 answer
112 views

I have an OutlinedTextField with label text. When the field is empty, I want the label hint aligned to the end of the field, like this: . However, the only way I've found to do this is by expanding ...
theasianpianist's user avatar
0 votes
0 answers
36 views

I am using Jetpack Compose and a simple text field Here is my code @Composable fun SimpleFilledTextFieldSample() { var text by remember { mutableStateOf("") } val focusRequester = ...
Anudeep Ananth's user avatar
0 votes
1 answer
156 views

When I create a TextField using a TextFieldValue as it's value, as soon as I type a character it runs in an infinite loop, logging both my debug message before the condition check and 'show(ime(), ...
Oscar Nowell's user avatar
0 votes
1 answer
73 views

I want to set focus to an OutlinedTextField, programmatically, and I want the software keyboard to appear. But what I get is that when I set the focus to the OutlinedTextField, the software keyboard ...
18446744073709551615's user avatar
1 vote
1 answer
136 views

I'm using Compose's BasicTextField, and when I drag the cursor, the text doesn't scroll. var text by remember { mutableStateOf("123456789123456") } Box(contentAlignment = Alignment.Center) {...
seven years's user avatar
0 votes
0 answers
36 views

This is my code. When I place the cursor with my finger, it will randomly move to another location than where I placed it. var textFieldValueState by remember { mutableStateOf( ...
km11's user avatar
  • 568
0 votes
1 answer
800 views

Trying to understand how to limit font scaling, from this example here: Text( text = "This is resizing text with font scale ${LocalDensity.current.fontScale}", fontSize = 20.sp ) On ...
Ralf Wickum's user avatar
  • 3,178
2 votes
1 answer
159 views

I'm using InputTransformation in Jetpack Compose to filter user input in a BasicTextField. The transformation works correctly, but the cursor remains in the same position after entering text instead ...
Vivek Modi's user avatar
  • 7,859
0 votes
1 answer
143 views

I'm building a screen in Jetpack Compose where I want a BasicTextField to be "active" as soon as the screen loads. By "active," I mean that the label should animate upward (just ...
Vivek Modi's user avatar
  • 7,859
0 votes
0 answers
77 views

I am building an Android app using Jetpack Compose. My UI has two text fields: BasicTextField (with KeyboardType.Email). SecureTextField (with KeyboardType.Password). When I copy some text from the ...
Vivek Modi's user avatar
  • 7,859
1 vote
1 answer
412 views

I'm encountering an issue with the label in BasicTextField in Jetpack Compose. When the text field gains focus (either by clicking or tapping), the label's height behaves strangely and does not ...
Vivek Modi's user avatar
  • 7,859
1 vote
2 answers
240 views

In a new Android Compose project using material3, I'm trying to set focusedLabelColor of OutlinedTextField as follows but it didn't work unless setting color on Text. OutlinedTextField( ...
Inori's user avatar
  • 31
2 votes
1 answer
808 views

I want to apply a visual transformation to a BasicTextField in Jetpack Compose. I've tried some code, but I'm facing several issues. For example, the cursor doesn't stay in the correct position, and ...
Vivek Modi's user avatar
  • 7,859
1 vote
1 answer
65 views

I tried implementing a jetpack compose text field (e.g. a composable function CustomTextField that makes use of JetpackCompose TextField component from Material 3), and tried to use my composable ...
rollebonM's user avatar
  • 416
0 votes
1 answer
385 views

Having this simple example: @Composable fun SimpleFilledTextFieldSample() { var text by remember { mutableStateOf("Hello") } TextField( value = text, onValueChange = ...
Special Muesli's user avatar
2 votes
0 answers
82 views

The shadow effect on a Text Composable, applied using Shadow(), looks great as it aligns with the shape of the text content. This works perfectly when there’s no ellipsis, allowing the shadow to ...
Jacky Tsang's user avatar
0 votes
1 answer
193 views

In my Jetpack Compose app, it seems that any time I open a popup such as DropdownMenu while I'm typing something, the keyboard will disappear. Perhaps this happens because the TextField loses focus? I ...
realDonaldDuck's user avatar
0 votes
1 answer
288 views

I'm trying to familiarize myself with the latest Jetpack-Compose but I'm finding that the Material3 version of BasicTextField doesn't match... pretty much any example anywhere. I'd love to know how it'...
JoeHz's user avatar
  • 2,196
0 votes
0 answers
162 views

I'm working on a Jetpack Compose project where I need a full-screen TextField. However, I'm running into an issue where the cursor hides behind the keyboard when the user types long text. I've already ...
Tawhid Monowar's user avatar
1 vote
2 answers
861 views

I have an OutlinedTextField and I want it to have a white background but only the TextField. The thing is, when I add modifier = Modifier.background(color = AppWhite), not only the TextField is white, ...
juske's user avatar
  • 310
0 votes
2 answers
350 views

I have a textfield and trying to achieve something like When I set a value to textfield programmatically. Its a username field on login form. If it is saved previously by user then we mask first 4 ...
dchks11's user avatar
  • 695
1 vote
1 answer
163 views

I have two TextFields, to provide good UX, I tried to use keyboardOptions and keyboardActions properties of TextFields. I have tried as: val focusRequester = remember { FocusRequester() } val ...
Arshad Ali's user avatar
  • 3,284
1 vote
1 answer
285 views

I'm working on three pages: StartPage, LoginPage, and SignupPage, and I'm integrating them into a HorizontalPager. In the SignupPage, i'm using requestFocus on textField. The navigation flow is Start -...
Fatima Jamal's user avatar
3 votes
1 answer
134 views

I need my calculator BasicTextField to show the cursor but not the keyboard. Currently, when I tap the BasicTextField for the first time, the cursor appears, but the keyboard does not. When I tap it a ...
Nazor's user avatar
  • 35
2 votes
1 answer
114 views

Ex: 23456-232 while typing above card number. we want to auto populate immediately - after 5th digit typed, then, user can enter last 3 digits. how to achieve this in Jetpack compose in android.
harikrishnan's user avatar
  • 1,945
1 vote
2 answers
62 views

How do I hide view which is in light blue? . I want to show border for a full TextField. I am trying to create a view like below. purple color will get updated to red or grey depending on state of ...
dchks11's user avatar
  • 695
2 votes
1 answer
623 views

I am facing some unexpected TextStyle behaviour while applying different styles in Jetpack Compose. This is my code: @Composable fun TextDecorationExample() { var isUnderlined by remember { ...
J K's user avatar
  • 23
2 votes
0 answers
209 views

For certain words I'm emphasizing, and for that I'm putting an arbitrary annotation on the TextFieldValue. val text = buildAnnotatedString { append("TEST!! ") ...
H.Kim's user avatar
  • 605
1 vote
1 answer
268 views

It needs to make a row in the column, the row should have two text items, the second should right align the first text item. And when the first text has longer text content, it should grow up to a max ...
lannyf's user avatar
  • 11.1k
1 vote
1 answer
53 views

I have some content with textfields passed as a lambda to another composable. Lambda is always a part of layout as it's in both branches of if statement, however when condition of 'if' changes - text ...
Nazar Dunets's user avatar
1 vote
0 answers
41 views

Surface { Box(contentAlignment = Alignment.Center, modifier = Modifier .fillMaxSize() .padding(32.dp)) { var state by remember { mutableStateOf(TextFieldValue("")) } ...
Jeff Liu's user avatar
  • 141
0 votes
1 answer
35 views

I want to show the list of customer's names in lazy column, so i created a list variable and used clicableText composables inside it, so that each item can be clicked, then i want to use it inside a ...
Soonha Soomro's user avatar
-1 votes
1 answer
129 views

When ever I use the Text() function, it shows this error: None of the following functions can be called with the arguments supplied. Text(AnnotatedString, Modifier = ..., Color = ..., TextUnit = ..., ...
Shahid Faried's user avatar
1 vote
0 answers
89 views

I am trying to create a fully custom TextField in Android using Jetpack compose everything is ok with the hardware keyboard but the soft keyboard is not opening this is how I start: (with simple code) ...
Atras VidA's user avatar
0 votes
1 answer
79 views

I've a composable that contains a text composable which displays the a duration string provided in the params of the composable function. The problem is that the duration string is getting updated ...
Pravesh Singh's user avatar
0 votes
0 answers
339 views

I am using a LazyColumn to display the name of a person in a vertical style so that it could be seen amongst the crowd easily. But I want the font size of the characters in the list to dynamically ...
Mohammed Mustafa Ali's user avatar
3 votes
3 answers
317 views

I'm trying to create default parameters via leadingIcon: @Composable () -> Unit= {} or trailingIcon: @Composable (() -> Unit)? = null, but ran into a problem. An empty form is created on the ...
Denis Skurtu's user avatar
3 votes
1 answer
205 views

I am migrating my application from Android to Jetpack Compose and for now i am using ComposeView inside fragments. Inside Login Fragment there is a OutlinedTextField which must accept Phone number ...
Hossein Panahi Irdemousa's user avatar
0 votes
1 answer
1k views

I get this compile error: None of the following functions can be called with the arguments supplied This is my code: import androidx.compose.foundation.layout.padding import androidx.compose....
Tony's user avatar
  • 111
0 votes
3 answers
475 views

I'm trying to implement a visibility toggle in Jetpack Compose, however, the password is visible right after I click the button, even before the authentication. var isAuthenticated by remember { ...
Ayush Thakur's user avatar
1 vote
0 answers
542 views

I'm trying to achieve a floating label effect with BasicTextField2 in Jetpack Compose. My goal is to have a placeholder that: Is initially displayed inside the text field when empty. Transitions to a ...
Vivek Modi's user avatar
  • 7,859
0 votes
1 answer
133 views

I have a text of different sizes it might fit 1-3 lines usually. I am building the text with annotated string and the last two words is always "search everywhere". However, I got a problem I ...
Oathkeeper's user avatar
0 votes
1 answer
254 views

I'm developing an app with Jetpack Compose, in the Theme.kt i have imported and overriden the primaryColor as it shows private val LightColorScheme = lightColorScheme( primary = Primary ) Below ...
Andre's user avatar
  • 31
0 votes
1 answer
68 views

I want to implement a feature where when I click on a specific sentence within this paragraph, the background color of that sentence changes. I've tried looking into gesture detection and text ...
Kursat's user avatar
  • 31

1
2 3 4 5
9