5,177 questions
0
votes
1
answer
94
views
Visibility of TextField label compared to Picker or Toggle in SwiftUI
If I place a Picker or a Toggle in a SwiftUI Form, the associated label is always visible:
But for a TextField, the label is only shown while the field is empty:
And as soon as I start to fill in ...
1
vote
1
answer
141
views
How to paste a copied file into a TextField and get the file path?
I want to let the user copy a file from the device file manager and then paste it into a TextField in my Flutter app.
When the user clicks "Paste" in the text field, I want to get the path ...
-1
votes
2
answers
161
views
Updating a JTextField from the inside of a Java for loop
The purpose of my program is to do time-consuming file operations that are executed inside a for loop.
That's why I would like the program to show the current operation through a text field.
I don't ...
0
votes
1
answer
75
views
TextFields Disappear After App Resume from Background Until Keyboard Opens [closed]
I have a screen in my Android app using Jetpack Compose. The issue is:
User fills in the text fields and leaves the app (app goes to background)
When user returns to the app, all TextFields completely ...
-1
votes
3
answers
101
views
SwiftUI TextField with number format ignores environment locale
I'm facing the issue that SwiftUI's TextField with a number format seems to ignore the locale set by the environment modifier.
struct MyView: View {
@State
var number: Decimal = 1.1
var ...
0
votes
0
answers
64
views
Flutter (Android TV) — soft keyboard overlap/hides TextFormField
Problem:
I'm building a login screen for an Android TV app. The layout is a two-column panel (left: QR, right: email/password form). When the on-screen keyboard appears, the email field stays visible ...
0
votes
0
answers
97
views
NavigationStack causes microhang when loading sheet
I have a simple sheet:
.sheet(isPresented: $newContactSheetTrigger) {
NewContactSheet()
.presentationDetents([.large])
}
with the following code:
import SwiftUI
import SwiftData
import ...
1
vote
2
answers
98
views
SwiftUI TextField input is super laggy for SwiftData object
I have a SwiftUI View where I can edit financial transaction information. The data is stored in SwiftData. If I enter a TextField element and start typing, it is super laggy and there are hangs of 1-2 ...
2
votes
1
answer
125
views
How to create a custom TextField that expands vertically with its content?
I’m trying to build a custom text field that automatically resizes its height based on the content (so if I type multiple lines, the field grows vertically).
Here is my current code:
import SwiftUI
...
1
vote
1
answer
99
views
Vaadin 24 visible suffix component when TextField/TextArea disabled
I'm trying to add a copy button to the clipboard for input fields. It is required to add the element specifically to the component suffix, and not through the use of horizontal layout (if possible).
...
0
votes
1
answer
63
views
Focus traversal on TextField not working as expected in Flutter
Below code generates UI as follows, here which ever container is selected it gets highlighted with border and its descendants are traversable on tapping tab, other container's children does not get ...
0
votes
0
answers
116
views
Autocompleting TextField inside a TableView?
I'm trying to add autocompletion to a TextField that acts as a data column in a TableView.
In particular, I want to use an Array of String values as suggestions, but not require that the value of the ...
0
votes
2
answers
134
views
How do I increase the height of a textfield that is using the RoundedBorderTextFieldStyle?
When I was making a SwiftUI app for macos, I wanted to have a textfield that used both the RoundedBorderTextFieldStyle and be slightly larger than regular.
I specifically wanted the visual effect that ...
1
vote
1
answer
115
views
TextField force uppercased while typing (macOS)
How do I force uppercase characters while typing in a TextField on macOS?
I started with this snippet from Paul Hudson:
struct ContentView: View {
@State private var name = "Paul"
...
0
votes
0
answers
57
views
SwiftUI Bug on tvOS 18 – TextField Broken in Modals
Just noticed a bug in tvOS 18+:
If you present a modal (.sheet) that contains a TextField, click into the text field to select your text from keyboard, then press the Back button, the TextField ...