mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-11 13:07:45 +01:00
27 lines
945 B
Kotlin
27 lines
945 B
Kotlin
package eu.kanade.tachiyomi.widget
|
|
|
|
import android.content.Context
|
|
import android.support.v7.widget.LinearLayoutManager
|
|
import android.util.AttributeSet
|
|
|
|
/**
|
|
* No Predictive Animations LinearLayoutManager
|
|
*/
|
|
open class NpaLinearLayoutManager : LinearLayoutManager {
|
|
|
|
constructor(context: Context): super(context) {}
|
|
|
|
constructor(context: Context, orientation: Int, reverseLayout: Boolean)
|
|
: super(context, orientation, reverseLayout) {}
|
|
|
|
constructor(context: Context, attrs: AttributeSet, defStyleAttr: Int, defStyleRes: Int)
|
|
: super(context, attrs, defStyleAttr, defStyleRes) {}
|
|
|
|
/**
|
|
* Disable predictive animations. There is a bug in RecyclerView which causes views that
|
|
* are being reloaded to pull invalid ViewHolders from the internal recycler stack if the
|
|
* adapter size has decreased since the ViewHolder was recycled.
|
|
*/
|
|
override fun supportsPredictiveItemAnimations() = false
|
|
|
|
} |