Skip to content

Commit

Permalink
fix: PageLocationChangeDetector's page dimensions differ is broken
Browse files Browse the repository at this point in the history
  • Loading branch information
saket committed Sep 16, 2019
1 parent bcc400a commit f33ac56
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ internal class PageLocationChangeDetector(
private var lastClippedDimens = Rect()
private var lastState = page.currentState

private val rectBuffer = Rect()

override fun onPreDraw(): Boolean {
dispatchCallbackIfNeeded()
return true
Expand All @@ -43,7 +41,7 @@ internal class PageLocationChangeDetector(
lastTranslationY = page.translationY
lastWidth = page.width
lastHeight = page.height
lastClippedDimens.set(rectBuffer)
lastClippedDimens.set(page.clippedDimens)
lastState = page.currentState
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ abstract class BaseExpandablePageLayout @JvmOverloads constructor(

outlineProvider = object : ViewOutlineProvider() {
override fun getOutline(view: View, outline: Outline) {
val clippedDimens = clippedDimens
outline.setRect(0, 0, clippedDimens.width(), clippedDimens.height())
outline.alpha = clippedDimens.height().toFloat() / height
}
Expand Down

0 comments on commit f33ac56

Please sign in to comment.