Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions android/src/main/java/me/sectiontn/flume/FlumeView.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package me.sectiontn.flume

import android.content.Context
import android.graphics.Canvas
import android.view.MotionEvent
import android.view.View
import android.view.VelocityTracker
Expand Down Expand Up @@ -781,6 +782,14 @@ class FlumeView(context: Context) : FrameLayout(context) {
down.recycle()
}

// A list clips to its bounds like a ScrollView, so a pinned copy pushed past the edge leaves the screen with it.
override fun dispatchDraw(canvas: Canvas) {
val saved = canvas.save()
canvas.clipRect(0, 0, width, height)
super.dispatchDraw(canvas)
canvas.restoreToCount(saved)
}

override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
super.onSizeChanged(w, h, oldw, oldh)
if (adapter.onViewportChanged(w, h, resources.configuration.fontScale)) sticky.refresh(force = true)
Expand Down
Loading