List of usage examples for android.support.v4.view ViewPager getLocationOnScreen
public void getLocationOnScreen(@Size(2) int[] outLocation)
Computes the coordinates of this view on the screen.
From source file:de.vanita5.twittnuker.fragment.support.UserListFragment.java
@Override public boolean isScrollContent(float x, float y) { final ViewPager v = mViewPager; final int[] location = new int[2]; v.getLocationOnScreen(location); return x >= location[0] && x <= location[0] + v.getWidth() && y >= location[1] && y <= location[1] + v.getHeight(); }