Skip to content

Instantly share code, notes, and snippets.

View CodyEngel's full-sized avatar

Cody Engel CodyEngel

View GitHub Profile
@CodyEngel
CodyEngel / TestHandler.kt
Last active April 24, 2024 16:34 — forked from dpmedeiros/AndroidMockUtil.java
Mock main thread handler for use in Android unit tests (requires Mockito and PowerMock)
package <Whatever Package Ya Want Really>
import android.os.Handler
import io.mockk.every
import io.mockk.mockk
import java.util.concurrent.CountDownLatch
/**
* TestHandler provides a way to execute tests that require a [Handler].
*
@CodyEngel
CodyEngel / README.md
Last active September 13, 2017 11:05 — forked from polbins/README.md
Simple RecyclerView Divider

Simple RecyclerView Divider

Simple Horizontal Divider Item Decoration for RecyclerView

    mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
            getApplicationContext()
    	));

NOTE: Add item decoration prior to setting the adapter