Example usage for android.support.v4.view ViewPager getLocationOnScreen

List of usage examples for android.support.v4.view ViewPager getLocationOnScreen

Introduction

In this page you can find the example usage for android.support.v4.view ViewPager getLocationOnScreen.

Prototype

public void getLocationOnScreen(@Size(2) int[] outLocation) 

Source Link

Document

Computes the coordinates of this view on the screen.

Usage

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();
}