In my app I have a scroll view with n number of data to be listed out. There are two buttons one is named as UP placed above scroll view and the other is DOWN placed below scroll view.
Using the UP and DOWN buttons the list of views can be scrolled.
When the scroll bar is in top the Up button will be invisible
and when the scroll bar reaches the bottom the DOWN button will become invisible
, I have written logic for this using the getScrollX()
method.
Now my problem is when there is very few data for example 3, the scroll bar will not be visible and the layout cannot be scrolled, in such a case both the UP and DOWN buttons need to be in invisible
. How to do this, please suggest me a way?