Code example for ViewParent

Methods: getParent

0
	public ViewGroup getParentFliper(View view) {
		if (view.getParent() instanceof BaseRealViewSwitcher) {
			return (ViewGroup) view.getParent();
		} else { 
			ViewParent parentView = view.getParent();
			if (parentView != null && parentView.getParent() == null)
				return null; 
			else 
				return getParentFliper((View) parentView);
		} 
 
	} 
 
	private void snapToDestination() { 
		final int screenHeight = getHeight();
 
		boolean isOnRight = getScrollY() > screenHeight * mCurrentScreen;
		boolean limitToSnap = Math.abs(getScrollY() - screenHeight
				* mCurrentScreen) > ViewConfiguration.get(getContext())
				.getScaledPagingTouchSlop();