Skip to content

Instantly share code, notes, and snippets.

View kaeawc's full-sized avatar

Jason Pearson kaeawc

View GitHub Profile
@kaeawc
kaeawc / MotionLayoutExtensions.kt
Created January 17, 2020 16:35
MotionLayout extension functions to help aid transitions and debugging
import android.content.Context
import androidx.constraintlayout.motion.widget.MotionLayout
import androidx.constraintlayout.motion.widget.MotionScene
import timber.log.Timber
fun MotionLayout.after(completion: () -> Unit) {
Timber.v("Started listening, currently at ${currentState.resName(context)}")
this.setTransitionListener(object: MotionLayout.TransitionListener {
@kaeawc
kaeawc / ExampleUnitTest.kt
Created June 14, 2020 03:30
The example test file that Android Studio creates
package dev.jasonpearson.testing
import org.junit.Test
import org.junit.Assert.*
/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).