Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show to the user that there are more stuff in a ScrollView on Android

I have a fragment with a ScrollView. When there are more things to be shown I'd like to show something to the users (an arrow?) to let they know that they can scroll to see something more.

Is there a way to do it?

like image 875
kingston Avatar asked Oct 08 '13 09:10

kingston


People also ask

How many children can a ScrollView have?

A scroll view contains a single direct child only. In order to place multiple views in the scroll view, one needs to make a view group(like LinearLayout) as a direct child and then we can define many views inside it.

Is a view group that displays a list of scrollable items?

ListView is a view group that creates a list of scrollable items. The list items are automatically inserted into the list using a list adapter.

What is nested scroll view?

NestedScrollView is just like ScrollView , but it supports acting as both a nested scrolling parent and child on both new and old versions of Android. Nested scrolling is enabled by default.

What is the difference between RecyclerView and ScrollView?

In the practical on scrolling views, you use ScrollView to scroll a View or ViewGroup . ScrollView is easy to use, but it's not recommended for long, scrollable lists. RecyclerView is a subclass of ViewGroup and is a more resource-efficient way to display scrollable lists.


2 Answers

You can make your scrollview' scrollbar visible all the time, instead of only if the user tries to scroll down/up.

You can do it by adding android:fadeScrollbars="false" into your definition of your ScrollView XML

like image 172
Moelbeck Avatar answered Sep 28 '22 08:09

Moelbeck


As far as I know, there's no out-of-the-box implementation for this. You could just have your ScrollView inside a RelativeLayout, and change visibility of an ImageView (your arrow), which would be on top of ScrollView, depending on wether or not the scroll has scrolled to the bottom.

like image 20
ssantos Avatar answered Sep 28 '22 09:09

ssantos