Questions tagged [scrollview]

Be sure to use a **platform specific** tag. Use this tag only for the most general questions about scroll views on all platforms. A scroll view is a view that can be scrolled by the user, inside a containing area. One of the basics of all modern UX.

A view that can be scrolled by the user, inside a containing area.

It is essential to use for Android's ScrollView. It is essential to use for the iOS ScrollView.

6948 questions
101
votes
6 answers

React Native: vertical centering when using ScrollView

I'm using React Native and I'm having trouble retaining vertical centering of elements as soon as I introduce a ScrollView. To demonstrate, I created 3 apps with React Native Playground. All examples have 2 pages, and they can be toggled by…
Johnny Oshika
  • 54,741
  • 40
  • 181
  • 275
94
votes
8 answers

How to add scroll indicator in ListView

Is there any way to show the scroll indicator on the ListView? Here is my basic code: ListView.builder( itemCount: 50, itemBuilder: (context, index) => ListTile(title: Text("Item= ${index + 1}"),), )
user6274128
91
votes
9 answers

ViewPager inside a ScrollView does not scroll correclty

I have a 'page' that has a number of components on it, and who's content is longer than the height of the device. Fine, just put all of the layout (the entire page) inside a ScrollView, no problem. One of the components is a ViewPager. This…
electricSunny
  • 3,229
  • 4
  • 19
  • 21
91
votes
15 answers

Android: Detect when ScrollView stops scrolling

I'm using a ScrollView in Android and where the visible portion of the ScrollView is the same size as one of the cells inside the Scrollview. Every "cell" is the same height. So what I am trying to do is snap into position after the ScrollView has…
user1053691
  • 911
  • 1
  • 7
  • 4
81
votes
13 answers

How to scroll the edittext inside the scrollview

I have a scrollview inside which there is a editext which is multiline. I want to scroll the edittext to see the lower content but it can't be done.
Maveňツ
  • 1
  • 12
  • 50
  • 89
75
votes
11 answers

Center widget vertically inside a SingleChildScrollView

I'm new to Flutter so I train myself by making a simple form. I realized while I was debugging on my iPhone the virtual keyboard triggered an error: "A RenderFlex overflowed by 29 pixels on the bottom". I fixed this issue by wrapping my Container…
Hurobaki
  • 3,728
  • 6
  • 24
  • 41
75
votes
18 answers

Scroll to a specific view in scroll view

I have added a scrollview and the subchilds inside the scrollview. At some point i need to scroll to a specific view. 1. 2.
Rajagopal
  • 931
  • 1
  • 8
  • 23
74
votes
17 answers

Isn't there an easy way to pinch to zoom in an image in SwiftUI?

I want to be able to resize and move an image in SwiftUI (like if it were a map) with pinch to zoom and drag it around. With UIKit I embedded the image into a UIScrollView and it took care of it, but I don't know how to do it in SwiftUI. I tried…
Zheoni
  • 881
  • 1
  • 7
  • 11
74
votes
5 answers

Non-scrollable ListView inside ScrollView

I'm trying to make a layout like this: The problem is that I don't want the ListViews to be scrollable. I want them to be as high as they need to and make the whole screen be scrollable. If I set the height of the ListView to wrap_content, that…
Dennis
  • 2,271
  • 6
  • 26
  • 42
69
votes
11 answers

How to put GridView inside ScrollView

I have to design layout such that whole layout should scroll and inside layout I have to display related content in Grid form so I decided to use GridView.But problem is that I’m unable to use GridView inside ScrollView I have read…
Dilip
  • 2,271
  • 5
  • 32
  • 52
67
votes
7 answers

React Native Touchable is disabling ScrollView

I'm new to React Native, so am probably asking something very obvious, but please help. I have a view wrapped in a touchable, so that the whole area responds to tapping. Then have a ScrollView nested inside the view. The overall structure is…
Wonil Suh
  • 1,041
  • 2
  • 9
  • 8
63
votes
7 answers

Grid of images inside ScrollView

I'm trying to create a screen with both text and images. I want the images to be laid out like a grid, as shown below, but I want them to have no scroll functionality other that the one provided by the surrounding ScrollView. An image will best…
hanspeide
  • 2,819
  • 4
  • 25
  • 33
61
votes
8 answers

iOS ScrollView needs constraint for y position or height

-ViewController --View ---ScrollView (Top,Bottom,Leading,Trailing spaces to superview set to 0) ----ContentView (Top,Bottom,Leading,Trailing spaces to superview set to 0, Width equals with View (ViewController's child)) -----Label1 -----etc... If i…
Bioaim
  • 928
  • 1
  • 13
  • 26
60
votes
12 answers

Android ScrollView doesn't start at top, but at the beginning of the GridView

I have a problem with a ScrollView that has inside of it a personalized GridView and other tipe of views.The first time I start the Activity, the ScrollView starts at its top, but if I visit the Activity other times the ScrollView starts at the…
user2328149
  • 737
  • 1
  • 8
  • 14
56
votes
4 answers

Is it possible to have a ViewPager inside of a ScrollView?

I'm trying to use a ViewPager inside of a ScrollView, but the ViewPager does not appear. If I remove the ScrollView the ViewPager appears fine. I've created a simple test project with the following: main.xml layout:
C0deAttack
  • 24,419
  • 18
  • 73
  • 81