Questions tagged [onscrollchanged]

Event called in response to an internal scroll in a view (i.e., the view scrolled its own contents).

Event called in response to an internal scroll in a view (i.e., the view scrolled its own contents). This is typically as a result of scrollBy(int, int) or scrollTo(int, int) having been called.

Parameters

l   Current horizontal scroll origin.
t   Current vertical scroll origin.
oldl    Previous horizontal scroll origin.
oldt    Previous vertical scroll origin. 

Reference:

http://developer.android.com/reference/android/view/View.html#onScrollChanged(int, int, int, int)

31 questions
25
votes
11 answers

Android scrollview onScrollChanged

I have a fixed content in my text view inside a scroll view. When the user scrolls to a certain position, I would like to start an activity or trigger a Toast.
SteD
  • 13,909
  • 12
  • 65
  • 76
9
votes
2 answers

onScrollChanged firing multiple times for scroll end in scrollView

I have implemented a listener class to detect end of scroll view referring the link https://gist.github.com/marteinn/9427072 public class ResponsiveScrollView extends ScrollView { private OnBottomReachedListener listener; public…
8
votes
1 answer

Play/Pause video when listitem get visible in recyclerview

I have implemented a recyclerview in which i am adding textures views as list items to play videos from url. Now like vine and instagram app i want to play a video when it is visible in the recyclerview and stop/pause video when listitem gets out of…
5
votes
0 answers

NestedScrollView.OnScrollChangedListener not working

I am writing an app which has NestedScrollView. I want to handle if the scroll has changed. I have searched on internet and found that i have to create custom ScrollView. Here is my code: public interface OnScrollChangedListener { void…
2
votes
3 answers

HideBottomViewOnScrollBehavior not working on recyclerview item expand/collapse

I am trying to hide text view on scroll down and show on scroll up it's working fine if I have an item like 10 or 15 but it's not working the same if I have less item in recyclerview, I have expanded/collapse functionality so it's not the same…
2
votes
0 answers

Increase scrolling speed of a Scrollview in Android

I have 2 Scrollview in which scrolling of second scrollview is dependent on the scrolling of first scrollview as when first scrollview is scrolled i want to programatically scroll second scrollview 2 times faster than the first one. Anyone please…
Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
2
votes
0 answers

Avoid items from ViewTree onScrollChanged()

I am using ViewTreeObserver.OnScrollChangedListener to determine when ScrollView bottom has been reached. Here is my layout: //use as a banner //there are…
Bishan
  • 15,211
  • 52
  • 164
  • 258
2
votes
1 answer

Detect End of scroll position custom webView

I used a custom webView to make scroll listener for webView. and I want to use it like: _webView = (ObservableWebView)findViewById(R.id.webView1); _webView.setOnScrollChangedCallback(new ObservableWebView.OnScrollChangedCallback() { …
Hamid
  • 1,493
  • 2
  • 18
  • 32
2
votes
1 answer

What is the difference between the verticall offset of a ScrollViewer itself and that of ScrollChangedEventArgs

I set a ScrollChangedEventHandler for a ScrollViewer as shown in the code below. private void scrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) { var scrollViewer = sender as ScrollViewer; if (scrollViewer == null) …
user4134476
  • 385
  • 4
  • 22
1
vote
0 answers

Hide and show on scroll right and left React-Native

In React Native, I am trying to create a Flatlist horizontal with right and left arrows, and I hope to make arrows to be visible and invisible on press on condition that it stays invisible if it is already on the side of right or left until…
1
vote
2 answers

Angular nativeElement undefined on view scroll

I'm getting an error when i'm trying to read the nativeElement on scroll. NativeElement is undefined, although I implement the AfterViewInit. I also use a reference variable in my H1 with the viewchild. The problem is on the myDiv viewchild. Also,…
Csibi Norbert
  • 780
  • 1
  • 11
  • 35
1
vote
0 answers

setOnScrollChangeListener is not working in NestedScrollView

I am setting a toolbar animation with help of nested scroll view. but the setOnScrollChangeListener is not working properly. here the issue is setOnScrollChangeListener is not working. scrolling is not detecting please help me to solve this…
1
vote
0 answers

React component should load onScroll and the scrollbar has to be hidden?

import React, { Component } from 'react'; import './App.css'; import Home from './Components/Home/Home'; import Videos from './Components/Videos/Videos'; import Services from './Components/Services/Services'; import Clients from…
hruday kumar reddy
  • 129
  • 1
  • 1
  • 13
1
vote
1 answer

How to hide a layout when a scrollview is scrolling in android

I am newbie to android and working on a scrollview,I have a footer layout and want to hide it while scrolling the scrollview,I have tried onscrollStatechange i have put that view's visibilty gone,But its not working.Can anybuddy help me to do this? …
1
vote
0 answers

Call scrollTo in onScrollChanged in Android HorizontalScrollView

My application layout is like this: Please click to see this image the blue area is my content, 4096px. the red frame is a phone screen which is a HorizontalScrollView. My layout is like this:
1
2 3