make viewPager nullable during fake drag

This commit is contained in:
tibbi 2017-09-30 22:55:25 +02:00
parent 0ef9ff06bf
commit b7cb6a5364

View file

@ -327,7 +327,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
val dragPosition = animation.animatedValue as Int
val dragOffset = dragPosition - oldDragPosition
oldDragPosition = dragPosition
view_pager.fakeDragBy(dragOffset * (if (forward) 1f else -1f))
view_pager?.fakeDragBy(dragOffset * (if (forward) 1f else -1f))
}
})