7,056 questions
8
votes
2
answers
269
views
JavaFX ListView programmatic selection scroll only when item is outside visible range
When selecting items programmatically in a ListView, I want the scroll to behave like native keyboard navigation — scroll only when the selected item is outside the visible area. Using listView....
1
vote
1
answer
35
views
Kivy ScrollView and ScreenManager: how to process the overscroll value and trigger an event in the main screen
First, progamming is a hobby for me, not a profession. The sample code below creates some artificial data in a dictionary that I want to access key by key when the ScrollView container is overscrolled....
Best practices
0
votes
2
replies
85
views
Too many views in a scrollview
I need some good advice please. I have a scrollview with a TableLayout. The table consists of 5 columns so every TableRow consists of 5 Textviews. It's working very well, but I would like to add more ...
1
vote
1
answer
186
views
How to programmatically scroll to a specific cell in nested ScrollViews (vertical containing horizontal)?
I have a SwiftUI view with nested ScrollViews — a vertical ScrollView containing a horizontal ScrollView that displays a grid of cells (columns A-K, rows 1-100). I want to programmatically scroll to a ...
0
votes
1
answer
126
views
SwiftUI ScrollView: GeometryReader + PreferenceKey Issues
I’m building a SwiftUI “scoreboard” style UI: a ScrollView with a single pinned header at the top. As you scroll, the pinned header should update to show the currently active section (NBA/NHL/etc), ...
1
vote
1
answer
163
views
ZStack background ignoring safe area while content respects it, all scrolling together in ScrollView
I'm trying to create a ScrollView with content at the top that has the following requirements:
The content (1. VStack) should be in a ZStack with a background color (or image)
The background should ...
1
vote
1
answer
108
views
How do you set up a SwiftUI LazyHStack so that it centers the nearest view when scrolling ends?
I'm currently setting up a scrollable selection of options with the intent that, when the user stops scrolling, the one closest to the centre is properly centred. However it just doesn't seem to be ...
0
votes
0
answers
54
views
CoordinatorLayout + NestedScrollView: adjustResize doesn’t scroll to focused view; adjustPan hides dropdown behind keyboard
I'm developing an Android application (Java) using the standard layout structure: CoordinatorLayout + AppBarLayout + NestedScrollView. I have a long form where some text fields are positioned at the ...
0
votes
1
answer
107
views
SwiftUI Timer + NavigationLink: play/pause button works inconsistently
My buttons work standalone, but when embedded in NavigationStack and other views, the play/pause buttons work sometimes then stops working other times. I've tried:
• Checked onAppear
• Verified ...
0
votes
2
answers
278
views
ScrollView behaviour
Want B over A in Zstack, Offset of scroll needs to be 200 (height of A). Either B is pinned to top and has 200 offset or B starts at 200 y position and as we scroll up its y also changes, so after 200 ...
2
votes
0
answers
188
views
How can I fix the broken layout with a ScrollView inside a TabView that is inside a NavigationStack in SwiftUI?
I'd like to achieve a layout similar to the one shown in the Apple Fitness app. When I insert a ScrollView into a TabView, everything works fine, but if I try to add a NavigationStack to wrap the ...
0
votes
0
answers
98
views
How to put a wheel picker inside a ScrollView in Expo?
I need to render a wheel picker inside a ScrollView in my Expo app. I tried using WheelPickerExpo but I keep getting this error:
VirtualizedLists should never be nested inside plain ScrollViews with ...
1
vote
2
answers
371
views
Large navigation title scrolls with ScrollView, even if it should not
I have simple setup to reproduce this:
struct ContentView: View {
var body: some View {
NavigationStack {
VStack {
Rectangle()
...
0
votes
1
answer
275
views
Buggy ScrollView + LazyVStack animation - is it fixable?
The following code will render a list of items and a button to shuffle them and change their height withAnimation.
If you scroll down and shuffle it you will eventually see glitches in the animation, ...
0
votes
0
answers
52
views
Cannot render ScrollView + VStack + ScrollPosition correctly scrolled initially
The following code works properly, ensuring the list is scrolled at the correct ID when first rendered:
import SwiftUI
struct DataItem: Identifiable {
let id: Int
let height: CGFloat
init(id: ...