Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View guilhermesgb's full-sized avatar

Guilherme Santos guilhermesgb

  • 2N Telekomunikace
  • Prague
View GitHub Profile
@guilhermesgb
guilhermesgb / CollapsingToolbarContentScrimColorTransition.java
Last active January 18, 2018 15:03
TransitionManager transition for animating CollapsingToolbarLayout's contentScrim color changes
package com.mcontigo.unycos.utils;
import android.animation.Animator;
import android.animation.ObjectAnimator;
import android.animation.TypeEvaluator;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.design.widget.CollapsingToolbarLayout;
/*
* Conditions Of Use
*
* This software was developed by employees of the National Institute of
* Standards and Technology (NIST), an agency of the Federal Government.
* Pursuant to title 15 Untied States Code Section 105, works of NIST
* employees are not subject to copyright protection in the United States
* and are considered to be in the public domain. As a result, a formal
* license is not needed to use the software.
*
@guilhermesgb
guilhermesgb / pagarme-cardhash-java-android.java
Last active September 19, 2017 22:38
Generating a PagarMe CardHash manually using Java / Android
import android.util.Base64;
import java.io.IOException;
import java.net.URLEncoder;
import java.security.InvalidKeyException;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.X509EncodedKeySpec;
import javax.crypto.BadPaddingException;