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
34
votes
6 answers

Add a ScrollView to existing View

I'm developing a little app in Swift 2.0. I have a View with the following hierarchy: Now, the elements placed in this view can't be displayed entirely in it, so I would like to use a ScrollView in order to be able to scroll all the content. How I…
giograno
  • 1,749
  • 3
  • 18
  • 30
34
votes
10 answers

Add a Header to a GridView (Android)

I'm aware that the GridView does NOT support a header or footer. I'm extensively using GridViews and I would like to have headers that scroll with it. What is the best way to approach the problem? Extending the GridView? Extending the ScrollView or…
robsf
  • 1,713
  • 3
  • 14
  • 26
33
votes
6 answers

How to disable ScrollView Bounce In SwiftUI

Any Modifier available to stop bounce of ScrollView in swiftUI ? struct RoomDetailsView: View { var body: some View { ScrollView(showsIndicators: false) { Image("test") Text("Hello Text") ... …
Rohit Makwana
  • 4,337
  • 1
  • 21
  • 29
33
votes
1 answer

style Vs contentContainerStyle in ScrollView?

When I apply {alignItems: 'center', justifyContent: 'center'} to style prop, got following error, ScrollView child layout must be applied through the contentContainerStyle prop then applied same styling to contentContainerStyle and worked fine.…
ThinkAndCode
  • 1,319
  • 3
  • 29
  • 60
32
votes
12 answers

ScrollView Inside ScrollView

I Know people from Google have asked us not to put Scrollable view inside another Scrollable view but is there any official statement from them directing us not to do so?
AjOnFire
  • 2,868
  • 3
  • 25
  • 39
32
votes
4 answers

How to scroll to a particular position in recyclerview inside scrollview?

I have searched a lot regarding my query and none of them was useful. I have a recyclerview and some static data inside a scroll view which is inside a root parentlayout as show below. I have set - scrollview.scrollto(0,0); because everytime i…
32
votes
6 answers

React native Android ScrollView scrollTo not working

I am trying to use a horizontal ScrollView in React Native for Android, where the starting position is in the middle of the scrolling images rather than (0,0). The scrollTo method seems to be called correctly inside componentDidMount but nothing…
Rob M
  • 323
  • 1
  • 3
  • 5
32
votes
4 answers

How to disable and enable the scrolling on android ScrollView?

I am a android developer.I also want to use a ScrollView.This ScrollView need to some time disable scrolling and Some time enable scrolling .But i can no able to disable the scrolling .How to i implement it .Please help to me.I also try to use the…
Prosanto
  • 914
  • 3
  • 15
  • 27
31
votes
6 answers

React-Native Horizontal Scroll View Pagination: Preview Next Page/Card

I want to to a horizontal ScrollView with pagination enabled with one special requirement: each page (or card) is 90% of the container wide. The remaining 10% should be a preview of the next page. It is possible to do this with ScrollView? Can I…
30
votes
6 answers

Webview in Scrollview

I have to place WebView into ScrollView. But I have to put some views into the same scrollview before webview. So it looks like this:
Dmitriy
  • 830
  • 3
  • 15
  • 29
30
votes
8 answers

How to disable highlighting effect of TouchableOpacity when scrolling?

{contentData[i].name}

{contentData[i].description}
Henok Tesfaye
  • 8,287
  • 13
  • 47
  • 84
30
votes
7 answers

React Router v4 - Keep scrolling position when switching components

I have two s created with react-router. /cards -> List of cards game /cards/1 -> Detail of card game #1 When the user clicks on the "Return to list", I want to scroll the user where he was on the list. How can I do this?
Sancho
  • 1,288
  • 2
  • 25
  • 50
29
votes
7 answers

Android Unable to remove the color at the top and bottom

I have added a scrollView and if deploy on the android tablet,it has some problems. But it works fine on cellphone. When users move to the top or bottom of the whole page,it will automatically show the blue shadow which indicates users reaching the…
Thomas Lee
  • 1,001
  • 2
  • 13
  • 31
29
votes
3 answers

Flutter NotificationListener with ScrollNotification vs ScrollController

There are two options to retrieve the scroll position for a CustomScrollView. The documentation states the following: ScrollNotification and NotificationListener, which can be used to watch the scroll position without using a ScrollController. So…
Renato Stauffer
  • 738
  • 2
  • 14
  • 30
29
votes
7 answers

How can I avoid "IllegalStateException: Scrollview can host only one direct child"?

I am using ScrollView in my Android Layout but it shows IllegalStateException "Scrollview can host only one direct child" How can I avoid this exception? Crash info: 07-19 15:58:22.308 21372 21372 D AndroidRuntime: Shutting down VM 07-19…
mohammedsuhail
  • 701
  • 2
  • 11
  • 23