Skip to content

Instantly share code, notes, and snippets.

View Ferfalk's full-sized avatar

Fernando A. H. Falkiewicz Ferfalk

  • Curitiba, PR, Brasil
View GitHub Profile
@Ferfalk
Ferfalk / SimpleAnimationUtils.java
Last active February 27, 2019 21:26
Android SimpleAnimationUtils
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;
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);
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;
@Ferfalk
Ferfalk / custom.css
Last active November 17, 2023 04:24
Twitch Alert OBS Custom CSS font change
@import url('https://fonts.googleapis.com/css?family=Comfortaa');
.alert_text,.alert_secondary-text,.alert_text-accent {
font-family: 'Comfortaa' !important;
font-weight: bold !important;
}