¡@

Home 

2014/10/16 ¤W¤È 08:20:44

android Programming Glossary: oldy

Detect end of ScrollView

http://stackoverflow.com/questions/10316743/detect-end-of-scrollview

ScrollViewExt scrollView int x int y int oldx int oldy Then i had to override the OnScrollChanged method from ScrollView.. ScrollViewExt scrollView int x int y int oldx int oldy We take the last son in the scrollview View view View scrollView.getChildAt..

Synchronise ScrollView scroll positions - android

http://stackoverflow.com/questions/3948934/synchronise-scrollview-scroll-positions-android

protected void onScrollChanged int x int y int oldx int oldy Unfortunately Google never thought that we would need to access.. ObservableScrollView scrollView int x int y int oldx int oldy Then we need to override the ScrollView class to provide the.. protected void onScrollChanged int x int y int oldx int oldy super.onScrollChanged x y oldx oldy if scrollViewListener null..

Android: Synchronized scrolling of two different views

http://stackoverflow.com/questions/4591083/android-synchronized-scrolling-of-two-different-views

protected void onScrollChanged int x int y int oldx int oldy mListener.onScrollY y super.onScrollChanged x y oldx oldy which.. oldy mListener.onScrollY y super.onScrollChanged x y oldx oldy which leads to Handle vertical scroll public void onScrollY..

android: swipe left or right to slide views

http://stackoverflow.com/questions/12970249/android-swipe-left-or-right-to-slide-views

protected void onScrollChanged int x int y int oldX int oldY if Math.abs y oldY SlowDownThreshold currentlyScrolling true.. int x int y int oldX int oldY if Math.abs y oldY SlowDownThreshold currentlyScrolling true else currentlyScrolling.. swipe by comparing the new and old scroll locations if y oldY Scroll moved Right So we would do something like setContents..

Creating a table/grid with a frozen column and frozen headers

http://stackoverflow.com/questions/7586753/creating-a-table-grid-with-a-frozen-column-and-frozen-headers

scrollView int x int y int oldX int oldY if scrollView headerScrollView contentScrollView.scrollTo x.. scrollView int x int y int oldX int oldY The ScrollView class that implements this listener ObservableHorizontalScrollView.java.. protected void onScrollChanged int x int y int oldX int oldY super.onScrollChanged x y oldX oldY if null scrollViewListener..

Detect end of ScrollView

http://stackoverflow.com/questions/10316743/detect-end-of-scrollview

Interface public interface ScrollViewListener void onScrollChanged ScrollViewExt scrollView int x int y int oldx int oldy Then i had to override the OnScrollChanged method from ScrollView in my ScrollViewExt public class ScrollViewExt extends.. from the interface... @Override public void onScrollChanged ScrollViewExt scrollView int x int y int oldx int oldy We take the last son in the scrollview View view View scrollView.getChildAt scrollView.getChildCount 1 int diff view.getBottom..

Synchronise ScrollView scroll positions - android

http://stackoverflow.com/questions/3948934/synchronise-scrollview-scroll-positions-android

improve this question There is a method in ScrollView... protected void onScrollChanged int x int y int oldx int oldy Unfortunately Google never thought that we would need to access it which is why they made it protected and didn't add a.. public interface ScrollViewListener void onScrollChanged ObservableScrollView scrollView int x int y int oldx int oldy Then we need to override the ScrollView class to provide the ScrollViewListener hook. package com.test import android.content.Context.. this.scrollViewListener scrollViewListener @Override protected void onScrollChanged int x int y int oldx int oldy super.onScrollChanged x y oldx oldy if scrollViewListener null scrollViewListener.onScrollChanged this x y oldx oldy And..

Android: Synchronized scrolling of two different views

http://stackoverflow.com/questions/4591083/android-synchronized-scrolling-of-two-different-views

it. Code to trigger prog. scroll same for horizontal @Override protected void onScrollChanged int x int y int oldx int oldy mListener.onScrollY y super.onScrollChanged x y oldx oldy which leads to Handle vertical scroll public void onScrollY final.. protected void onScrollChanged int x int y int oldx int oldy mListener.onScrollY y super.onScrollChanged x y oldx oldy which leads to Handle vertical scroll public void onScrollY final int y mCurrentY y mVerticalScroll.smoothScrollTo 0 y XML..

android: swipe left or right to slide views

http://stackoverflow.com/questions/12970249/android-swipe-left-or-right-to-slide-views

and feel free to ask if you have anymore problems. @Override protected void onScrollChanged int x int y int oldX int oldY if Math.abs y oldY SlowDownThreshold currentlyScrolling true else currentlyScrolling false if currentlyTouching scrolling.. ask if you have anymore problems. @Override protected void onScrollChanged int x int y int oldX int oldY if Math.abs y oldY SlowDownThreshold currentlyScrolling true else currentlyScrolling false if currentlyTouching scrolling stopped...handle.. stopped...handle here Check if it was a left or right swipe by comparing the new and old scroll locations if y oldY Scroll moved Right So we would do something like setContents Index 1 We find out where the middle of the scroll is ..

Creating a table/grid with a frozen column and frozen headers

http://stackoverflow.com/questions/7586753/creating-a-table-grid-with-a-frozen-column-and-frozen-headers

replacementWidth public void onScrollChanged ObservableHorizontalScrollView scrollView int x int y int oldX int oldY if scrollView headerScrollView contentScrollView.scrollTo x y else if scrollView contentScrollView headerScrollView.scrollTo.. HorizontalScrollViewListener void onScrollChanged ObservableHorizontalScrollView scrollView int x int y int oldX int oldY The ScrollView class that implements this listener ObservableHorizontalScrollView.java public class ObservableHorizontalScrollView.. this.scrollViewListener scrollViewListener @Override protected void onScrollChanged int x int y int oldX int oldY super.onScrollChanged x y oldX oldY if null scrollViewListener scrollViewListener.onScrollChanged this x y oldX oldY The..