Skip to content

Instantly share code, notes, and snippets.

package com.thejakeofink.circlularrevealanimation;
import android.animation.Animator;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.view.animation.FastOutSlowInInterpolator;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
// All requesting permissions needs to happen inside of an Activity.
// When you request a permission it is like calling startActivityForResult()
// So you need to be able to have the call back that will handle whether the
// permission was granted or not. Checking permissions can be done from any context
// Also keep in mind for this implementation of runtime permissions you need to
// have included the support library in your build.gradle file.
// this is for your use only so this just needs to be distinct for your purposes.
private static final int REQUEST_LOCATION_PERMISSION = 101;
@thejakeofink
thejakeofink / ChromeCustomTabsActivity.kt
Created February 19, 2016 15:07
Chrome Custom Tabs example in Kotlin
package com.thejakeofink.chromecustomtabs
import android.content.ComponentName
import android.graphics.Color
import android.net.Uri
import android.os.Bundle
import android.support.customtabs.CustomTabsClient
import android.support.customtabs.CustomTabsIntent
import android.support.customtabs.CustomTabsServiceConnection
import android.support.customtabs.CustomTabsSession
@thejakeofink
thejakeofink / SceneTransitionExample.txt
Last active January 15, 2016 17:32
Example for a simple Scene Transition in Android.
TransitionSet transitionSet = new TransitionSet();
Scene endingScene = Scene.getSceneForLayout(findViewById(R.id.scene_root), int R.id.end_scene, context);
// There are multiple Transition types this is just one example.
// You can also make your own transitions
Transition cb = new ChangeBounds();
cb.addTarget(R.id.scene_target_one);
cb.addTarget(R.id.scene_target_two);