Questions tagged [scroll-offset]

7 questions
31
votes
5 answers

Android ListView current scroll location Y pixels

I'm trying to detect when a list view is scrolled beyond certain fixed threshold in pixels (half way through the first item). Unfortunately listview's getScrollY() seems to always return 0 instad of the scroll position. Is there any way to get the…
Juhani
  • 5,076
  • 5
  • 33
  • 35
27
votes
3 answers

Android: ListView.getScrollY() - does it work?

I am using it, but it always returns 0, even though I have scrolled till the end of the list.
Danail
  • 10,443
  • 12
  • 54
  • 76
20
votes
2 answers

How to get scroll position from GridView?

I am trying to build my own grid view functions - extending on the GridView. The only thing I cannot solve is how to get the current scroll position of the GridView. getScrollY() does always return 0, and the onScrollListener's parameters are just a…
mAx
  • 546
  • 1
  • 6
  • 17
5
votes
2 answers

Scroll offset of GridView

Is there a way to determine the current scroll offset or scroll position of a GridView? View.getScrollY() // Underlying var is not updated during a scroll. I have tried setting an OnScrollListener but the onScroll callback is not fine grained…
mdupls
  • 2,012
  • 1
  • 27
  • 40
1
vote
0 answers

Detect if the specific div is still visible in the window view portion in react js

Lets say I have 2 div tag in my web, the default window's view is the 1st div because it appears at the top. Refer to the image, the full square is the height of the document that can be scrolled up down. The red box is the portion that can be seen…
Eaten Taik
  • 868
  • 2
  • 12
  • 35
0
votes
1 answer

Onclick slide to current div

Currently, I have various rows on the homepage, and each row has a button. When the button is clicked, the div will slide up to the top of the page. But meanwhile, there is another action added to the button as well. Below is my js code: $(…
zacwhyyy
  • 13
  • 4
0
votes
1 answer

How to refresh GridView after it is scrolled programmatically?

I have a GridView nested into the following way:
János
  • 32,867
  • 38
  • 193
  • 353