Skip to content

Instantly share code, notes, and snippets.

import org.junit.jupiter.api.extension.*
import org.koin.core.Koin
import org.koin.core.context.startKoin
import org.koin.core.context.stopKoin
import org.koin.dsl.KoinAppDeclaration
/**
* Usage:
* Add as companion to test class like
* class GreetingDatabaseImplTest: KoinTest {
@taylorsloan
taylorsloan / ViewExtension.kt
Last active December 3, 2017 04:19
View extension functions for animating height expansion and collapse. Use these by calling "yourView.expand()" or "yourView.collapse()".
import android.view.View
import android.view.ViewGroup
import android.view.animation.Animation
import android.view.animation.Transformation
/**
* View extensions for expanding and collapsing
*/
fun View.expand() {
import android.animation.ObjectAnimator
import android.view.View
/**
* Simple class used to pulse a view infinitely then fade in when stopped.
* Created by tsloan on 11/15/2017.
*/
class PulseAnimation(view: View) {
private var pulseAnimation : ObjectAnimator? = null