Skip to content

Instantly share code, notes, and snippets.

View MarsVard's full-sized avatar

Mars MarsVard

View GitHub Profile
@Kraiden
Kraiden / BetterBounceInterpolator.java
Last active December 30, 2020 03:31
A more configurable bounce interpolator for Android animations
import android.view.animation.Interpolator;
import static java.lang.Math.*;
public class BetterBounceInterpolator implements Interpolator {
private int mBounces;
private double mEnergy;
/** Have more control over how to bounce your values.
*
@mcginty
mcginty / material_colors.xml
Last active March 17, 2022 04:09
Android XML resource with the full material color palette. Source: http://www.google.com/design/spec/style/color.html#color-color-palette
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="material_red50">#ffffebee</color>
<color name="material_red100">#ffffcdd2</color>
<color name="material_red200">#ffef9a9a</color>
<color name="material_red300">#ffe57373</color>
<color name="material_red400">#ffef5350</color>
<color name="material_red500">#fff44336</color>
<color name="material_red600">#ffe53935</color>
<color name="material_red700">#ffd32f2f</color>