Skip to content

Instantly share code, notes, and snippets.

View underwindfall's full-sized avatar
🐌
Making Progress

Qifan Yang underwindfall

🐌
Making Progress
View GitHub Profile
@underwindfall
underwindfall / DividerItemDecorator.kt
Created September 6, 2018 12:22 — forked from rock3r/DividerItemDecorator.kt
A simple yet fully featured RecyclerView ItemDecorator that draws a divider line between items. Only works with vertical LinearLayoutManagers!
package me.seebrock3r.common.widget
import android.graphics.Canvas
import android.graphics.Paint
import android.graphics.Rect
import android.view.View
import androidx.annotation.ColorInt
import androidx.annotation.Px
import androidx.core.graphics.withTranslation
import androidx.core.view.children
@underwindfall
underwindfall / BarListParcelConverter.java
Created July 19, 2017 10:09 — forked from cmelchior/BarListParcelConverter.java
Using Parceler 1.0.3 with Realm
// Specific class for a RealmList<Bar> field
public class BarListParcelConverter extends RealmListParcelConverter<Bar> {
@Override
public void itemToParcel(Bar input, Parcel parcel) {
parcel.writeParcelable(Parcels.wrap(input), 0);
}
@Override
public Bar itemFromParcel(Parcel parcel) {