Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block Bodo1981

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LoadMoreScrollListener.kt
class LoadMoreScrollListener(val layoutManager: LinearLayoutManager, val onLoadMore: () -> Unit) : RecyclerView.OnScrollListener() {
companion object {
private val ITEMS_BEFORE_LAST_ITEM = 5
private val TAG = LoadMoreScrollListener::class.javaClass.canonicalName
private var isLoading: Boolean = false
override fun onScrolled(recyclerView: RecyclerView?, dx: Int, dy: Int) {
View CustomExtensions.kt
object DelegatesExt {
fun notNullSingleValueVar<T : Any>(): ReadWriteProperty<Any?, T> = NotNullSingleValueVar()
fun longPreference(context: Context, name: String, default: Long) = LongPreference(context, name,
private class NotNullSingleValueVar<T : Any> : ReadWriteProperty<Any?, T> {
You can’t perform that action at this time.