Disable SupportsPredictiveItemAnimations in DownloadsScene
This commit is contained in:
1 parent
5b6a06b33b
commit
8ef7ac5a87
2 files changed
+6
No files matched your search
@@ -245,6 +245,7 @@ class DownloadsScene : BaseToolbarScene(), DownloadInfoListener, OnClickFabListe
|
||||
AutoStaggeredGridLayoutManager(0, StaggeredGridLayoutManager.VERTICAL)
|
||||
layoutManager.setColumnSize(resources.getDimensionPixelOffset(Settings.detailSizeResId))
|
||||
layoutManager.setStrategy(AutoStaggeredGridLayoutManager.STRATEGY_MIN_SIZE)
|
||||
layoutManager.supportsPredictiveItemAnimations = false
|
||||
recyclerView.layoutManager = layoutManager
|
||||
recyclerView.clipToPadding = false
|
||||
recyclerView.clipChildren = false
|
||||
|
||||
@@ -25,6 +25,7 @@ class AutoStaggeredGridLayoutManager(columnSize: Int, orientation: Int) :
|
||||
private var mColumnSize = -1
|
||||
private var mColumnSizeChanged = true
|
||||
private var mStrategy = 0
|
||||
var supportsPredictiveItemAnimations = true
|
||||
|
||||
init {
|
||||
setColumnSize(columnSize)
|
||||
@@ -46,6 +47,10 @@ class AutoStaggeredGridLayoutManager(columnSize: Int, orientation: Int) :
|
||||
mColumnSizeChanged = true
|
||||
}
|
||||
|
||||
override fun supportsPredictiveItemAnimations(): Boolean {
|
||||
return supportsPredictiveItemAnimations && super.supportsPredictiveItemAnimations()
|
||||
}
|
||||
|
||||
override fun onMeasure(
|
||||
recycler: RecyclerView.Recycler,
|
||||
state: RecyclerView.State,
|
||||
|
||||
Reference in new issue
Block a user