Code example for GestureDetector

		if (transformer instanceof DefaultHeaderTransformer) {
			final DefaultHeaderTransformer t = (DefaultHeaderTransformer) transformer;
		mGestureDector = new GestureDetector(getActivity(), this);
	public View onCreateView(final LayoutInflater inflater, final ViewGroup container, final Bundle savedInstanceState) {
		final View view = super.onCreateView(inflater, container, savedInstanceState);
		final Activity activity = getActivity();
		if (activity instanceof PullToRefreshAttacherActivity) {
			mPullToRefreshAttacher = ((PullToRefreshAttacherActivity) activity).getPullToRefreshAttacher();
			// Set the Refreshable View to be the ListView and the refresh 
			// listener 
			// to be this. 
			mPullToRefreshAttacher.addRefreshableView(view.findViewById(, this);
		} else 
			throw new IllegalStateException("Activity class must implement PullToRefreshAttacherActivity");
Connect your IDE to all the code out there  Get Codota for Java