Questions tagged [android-scrollview]

An Android widget that allows scrolling of its only child if it is too big for the screen's visible area.

The ScrollView will have only one direct child at all times (but a View hierarchy can be binded to that only child to allow the use of complex layouts).

If the child is bigger than the screen, the ScrollView will allow it to be scrolled and will indicate the scrolling capabilities by showing vertical scrollbars.

enter image description here

More information about the ScrollView can be found in the documentation for the class. Image source with overview can find here

1776 questions
906
votes
32 answers

Making TextView scrollable on Android

I am displaying text in a TextView that appears to be too long to fit into one screen. I need to make my TextView scrollable. How can I do that? Here is the code: final TextView tv = new…
359
votes
26 answers

How can I put a ListView into a ScrollView without it collapsing?

I've searched around for solutions to this problem, and the only answer I can find seems to be "don't put a ListView into a ScrollView". I have yet to see any real explanation for why though. The only reason I can seem to find is that Google…
DougW
  • 28,776
  • 18
  • 79
  • 107
341
votes
26 answers

RecyclerView inside ScrollView is not working

I'm trying to implement a layout which contains RecyclerView and ScrollView at the same layout. Layout template: ... …
293
votes
34 answers

Android list view inside a scroll view

I have an android layout which has a scrollView with a number of elements with in it. At the bottom of the scrollView I have a listView which is then populated by an adapter. The problem that I am experiencing, is that android is excluding the…
Zapnologica
  • 22,170
  • 44
  • 158
  • 253
238
votes
19 answers

Android: ScrollView force to bottom

I would like a ScrollView to start all the way at the bottom. Any methods?
Noah Seidman
  • 4,359
  • 5
  • 26
  • 28
228
votes
9 answers

HorizontalScrollView within ScrollView Touch Handling

I have a ScrollView that surrounds my entire layout so that the entire screen is scrollable. The first element I have in this ScrollView is a HorizontalScrollView block that has features that can be scrolled through horizontally. I've added an…
Joel
  • 6,193
  • 6
  • 22
  • 22
220
votes
7 answers

Android: ScrollView vs NestedScrollView

What is the difference between ScrollView and NestedScrollView? Both of them, extend FrameLayout. I want to know in depth pros and cons of both of them.
199
votes
17 answers

Android - how to make a scrollable constraintlayout?

I want to make a layout that lets me scroll down using constraint layout, but I don't know how to go about it. Should the ScrollView be the parent of the ConstraintLayout like this?
192
votes
18 answers

Recyclerview inside ScrollView not scrolling smoothly

For my app I am using a RecyclerView inside a ScrollView where the RecyclerView has a height based on its content using this library. Scrolling is working but it's not working smoothly when I scroll over the RecyclerView. When I scroll over the…
161
votes
19 answers

Can I scroll a ScrollView programmatically in Android?

Is there any way to scroll a ScrollView programmatically to a certain position? I have created dynamic TableLayout which is placed in a ScrollView. So I want that on a specific action (like clicking a Button, etc.) the particular row should scroll…
Arun Badole
  • 10,977
  • 19
  • 67
  • 96
117
votes
19 answers

Disable ScrollView Programmatically?

I would like to enable ScrollView and disable it by a Button Click. Disable means like if the ScrollView wasn't there, and enable it returns the ScrollView. I want that because I have a gallery with text images, and on a button click the screen…
Omar
  • 7,835
  • 14
  • 62
  • 108
110
votes
10 answers
110
votes
8 answers

How to prevent a scrollview from scrolling to a webview after data is loaded?

So I have a fascinating problem. Despite the fact that I'm not manually or programmatically scrolling my view, my WebView is being automatically scrolled to after the data inside it loads. I've got a fragment in a viewpager. When I first load the…
100
votes
16 answers

Recyclerview Changing Items During Scroll

I have a RecyclerView. Each row has a play button, textview and Progressbar. when click on the play button have to play audio from my sdcard and have to progress Progressbar The problem is when i scroll down the recyclerview change the Progressbar…
Arya
  • 1,729
  • 3
  • 17
  • 35
95
votes
13 answers

Detect end of ScrollView

I have an app, that has an Activity that uses a ScrollView. I need to detect when user gets to the bottom of the ScrollView. I did some googleing and I found this page where is explained. But, in the example, that guys extends ScrollView. As I said,…
Fustigador
  • 6,339
  • 12
  • 59
  • 115
1
2 3
99 100