433 questions
0
votes
0
answers
27
views
How i change height of DropdownMenuItem?
I am creating an auto-complete TextField using ExposedDropdownMenuBox in Jetpack Compose. I am using a custom component, SpotifyTextField that has a fixed height of 48.dp.
My goal is to make each ...
3
votes
1
answer
117
views
How to Change Jetpack Compose Bom Version to Alpha in libs.versions.toml?
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?
[...
1
vote
1
answer
292
views
OutlinedTextField keyboard has weird behaviour
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....
0
votes
1
answer
96
views
Android Compose SearchBar content alignment vertically?
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 ...
1
vote
1
answer
385
views
Error with TextField Kotlin Jetpack Compose
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(...
1
vote
1
answer
113
views
New BasicTextField (BasicTextField2) limit maxLength
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 ...
0
votes
1
answer
131
views
Android Compose OutlinedTextField disable capitalization
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 (...
0
votes
1
answer
113
views
How to align Jetpack Compose OutlinedTextField label without affecting border when field is populated?
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 ...
0
votes
0
answers
36
views
Android System clipboard dialogue not reliable in Compose Textfield
I am using Jetpack Compose and a simple text field
Here is my code
@Composable
fun SimpleFilledTextFieldSample() {
var text by remember { mutableStateOf("") }
val focusRequester = ...
0
votes
1
answer
156
views
Why does using a TextFieldValue in Jetpack Compose TextField cause infinite loop?
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(), ...
0
votes
1
answer
73
views
OutlinedTextField with onFocusChanged() and focusable(): no keyboard
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 ...
1
vote
1
answer
139
views
Compose BasicTextField, drag cursor text doesn't scroll
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) {...
0
votes
0
answers
36
views
BasicTextField cursor randomly moves after placing it
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(
...
0
votes
1
answer
800
views
How can I restrict font size scaling with Jetpack compose?
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 ...
2
votes
1
answer
159
views
Cursor doesn't move after filtering text Jetpack Compose
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 ...