Skip to content

Instantly share code, notes, and snippets.

Fernando A. H. Falkiewicz Ferfalk

  • Curitiba, PR, Brasil
Block or report user

Report or block Ferfalk

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View RevealBaseActivity.java
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.graphics.Point;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.ViewDataBinding;
View ScaleUtils.java
public class ScaleUtils {
private ScaleUtils() {
}
public static double linearMap(double source, double sourceMin, double sourceMax, double targetMin, double targetMax) {
return ((source - sourceMin) / (sourceMax - sourceMin)) * (targetMax - targetMin) + targetMin;
}
// public static double linearMap(double source, double sourceMin, double sourceMax, double targetMin, double targetMax) {
// return normalizedToScale(normalizeScale(source, sourceMin, sourceMax), targetMin, targetMax);
@Ferfalk
Ferfalk / SimpleAnimationUtils.java
Last active Feb 27, 2019
Android SimpleAnimationUtils
View SimpleAnimationUtils.java
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.graphics.Point;
import android.os.Build;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
You can’t perform that action at this time.