All Questions
Tagged with android-jetpack-compose android-compose-textfield
411 questions
0
votes
1
answer
44
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
27
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
46
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
31
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
64
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
31
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
178
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
103
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 ...
0
votes
1
answer
86
views
Auto-Focus BasicTextField Without Cursor Jetpack compose
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 ...
0
votes
0
answers
44
views
How to display masked characters in keyboard clipboard for SecureTextField
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 ...
1
vote
1
answer
142
views
Label positioning issue in BasicTextField on focus jetpack compose
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 ...
-1
votes
1
answer
163
views
How to Remove Underline from text in Jetpack Compose BasicTextField
I'm using Jetpack Compose and want to customize the appearance of a BasicTextField to remove the underline when displaying text. I tried setting the keyboardOptions to KeyboardOptions(keyboardType = ...
1
vote
2
answers
122
views
Jetpack Compose - TextField colors parameter not working
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(
...
2
votes
1
answer
287
views
How to Implement a Custom Masked Input with Fixed Prefix in Jetpack Compose BasicTextField?
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 ...
0
votes
0
answers
44
views
Compose TextField from Material 3 inside an xml RecycleView item - Cursor is not showing
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 ...