use of org.thoughtcrime.securesms.mediasend.SimpleAnimationListener in project Signal-Android by signalapp.
the class WebRtcCallView method animatePipToLargeRectangle.
private void animatePipToLargeRectangle(boolean isLandscape) {
final Point dimens;
if (isLandscape) {
dimens = new Point(ViewUtil.dpToPx(160), ViewUtil.dpToPx(90));
} else {
dimens = new Point(ViewUtil.dpToPx(90), ViewUtil.dpToPx(160));
}
ResizeAnimation animation = new ResizeAnimation(smallLocalRenderFrame, dimens.x, dimens.y);
animation.setDuration(PIP_RESIZE_DURATION);
animation.setAnimationListener(new SimpleAnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
pictureInPictureGestureHelper.enableCorners();
pictureInPictureGestureHelper.adjustPip();
}
});
smallLocalRenderFrame.startAnimation(animation);
}
use of org.thoughtcrime.securesms.mediasend.SimpleAnimationListener in project Signal-Android by WhisperSystems.
the class WebRtcCallView method animatePipToLargeRectangle.
private void animatePipToLargeRectangle(boolean isLandscape) {
final Point dimens;
if (isLandscape) {
dimens = new Point(ViewUtil.dpToPx(160), ViewUtil.dpToPx(90));
} else {
dimens = new Point(ViewUtil.dpToPx(90), ViewUtil.dpToPx(160));
}
ResizeAnimation animation = new ResizeAnimation(smallLocalRenderFrame, dimens.x, dimens.y);
animation.setDuration(PIP_RESIZE_DURATION);
animation.setAnimationListener(new SimpleAnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
pictureInPictureGestureHelper.enableCorners();
pictureInPictureGestureHelper.adjustPip();
}
});
smallLocalRenderFrame.startAnimation(animation);
}
use of org.thoughtcrime.securesms.mediasend.SimpleAnimationListener in project Signal-Android by WhisperSystems.
the class WebRtcCallView method animatePipToSmallRectangle.
private void animatePipToSmallRectangle() {
pictureInPictureGestureHelper.lockToBottomEnd();
pictureInPictureGestureHelper.performAfterFling(() -> {
ResizeAnimation animation = new ResizeAnimation(smallLocalRenderFrame, ViewUtil.dpToPx(54), ViewUtil.dpToPx(72));
animation.setDuration(PIP_RESIZE_DURATION);
animation.setAnimationListener(new SimpleAnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
pictureInPictureGestureHelper.adjustPip();
}
});
smallLocalRenderFrame.startAnimation(animation);
});
}
use of org.thoughtcrime.securesms.mediasend.SimpleAnimationListener in project Signal-Android by signalapp.
the class WebRtcCallView method animatePipToSmallRectangle.
private void animatePipToSmallRectangle() {
pictureInPictureGestureHelper.lockToBottomEnd();
pictureInPictureGestureHelper.performAfterFling(() -> {
ResizeAnimation animation = new ResizeAnimation(smallLocalRenderFrame, ViewUtil.dpToPx(54), ViewUtil.dpToPx(72));
animation.setDuration(PIP_RESIZE_DURATION);
animation.setAnimationListener(new SimpleAnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
pictureInPictureGestureHelper.adjustPip();
}
});
smallLocalRenderFrame.startAnimation(animation);
});
}
Aggregations