use of org.chromium.content_public.browser.GestureStateListener in project AndroidChromium by JackyAndroid.
the class Tab method createGestureStateListener.
private GestureStateListener createGestureStateListener() {
return new GestureStateListener() {
@Override
public void onFlingStartGesture(int scrollOffsetY, int scrollExtentY) {
onScrollingStateChanged();
}
@Override
public void onFlingEndGesture(int scrollOffsetY, int scrollExtentY) {
onScrollingStateChanged();
}
@Override
public void onScrollStarted(int scrollOffsetY, int scrollExtentY) {
onScrollingStateChanged();
}
@Override
public void onScrollEnded(int scrollOffsetY, int scrollExtentY) {
onScrollingStateChanged();
}
private void onScrollingStateChanged() {
FullscreenManager fullscreenManager = getFullscreenManager();
if (fullscreenManager == null)
return;
fullscreenManager.onContentViewScrollingStateChanged(getContentViewCore() != null && getContentViewCore().isScrollInProgress());
}
};
}
Aggregations