package com.lorentzos.flingswipe.internal;

import android.animation.AnimatorListenerAdapter;
import android.view.View;

/**
 *
 */
class SwipeEvent {

	private final float rotationFactor;
	private final FrameData frameData;
	private final View frame;

	SwipeEvent(float rotationFactor, View frame) {
		this.rotationFactor = rotationFactor;
		frameData = FrameData.fromView(frame);
		this.frame = frame;
	}

	void resultView(@Direction int direction, AnimatorListenerAdapter onAnimationEnd) {
		PointF f = new PointF(frame.getX(), frame.getY());

		frameData.getExitPosition(f, direction, rotationFactor)
				.exit(frame, onAnimationEnd);
	}

}

package com.lorentzos.flingswipe.internal;

import android.animation.AnimatorListenerAdapter;
import android.view.View;

/**
 *
 */
class SwipeEvent {

	private final float rotationFactor;
	private final FrameData frameData;
	private final View frame;

	SwipeEvent(float rotationFactor, View frame) {
		this.rotationFactor = rotationFactor;
		frameData = FrameData.fromView(frame);
		this.frame = frame;
	}

	void resultView(@Direction int direction, AnimatorListenerAdapter onAnimationEnd) {
		PointF f = new PointF(frame.getX(), frame.getY());

		float adjustedFactor = rotationFactor;
		if (direction == Direction.LEFT) {
			adjustedFactor *= -1;
		}

		frameData.getExitPosition(f, direction, adjustedFactor)
				.exit(frame, onAnimationEnd);
	}

}

Fix left exit rotation for button events
Fix left exit rotation for button events
