ViewRectWatcher

class ViewRectWatcher(view: View, targetRect: Rect)

视图与 矩形区域 监视器

Parameters

view

目标视图

targetRect

目标矩形区域

Constructors

ViewRectWatcher
Link copied to clipboard
fun ViewRectWatcher(view: View, targetRect: Rect)
目标视图

Functions

addOnViewRectChangedListener
Link copied to clipboard
fun addOnViewRectChangedListener(listener: OnViewChangedInRectListener)
添加监听器
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
hasOnViewChangedInRectListener
Link copied to clipboard
fun hasOnViewChangedInRectListener(listener: OnViewChangedInRectListener): Boolean
判断是否有监听器
onScrolling
Link copied to clipboard
private fun onScrolling()
removeOnViewRectChangedListener
Link copied to clipboard
fun removeOnViewRectChangedListener(listener: OnViewChangedInRectListener)
移除监听器
toString
Link copied to clipboard
open fun toString(): String
watch
Link copied to clipboard
fun watch()
开始进行事件监听
watchViewScrolling
Link copied to clipboard
private fun watchViewScrolling()

Properties

isIntersected
Link copied to clipboard
private var isIntersected: Boolean = false
onViewRectChangedListeners
Link copied to clipboard
private val onViewRectChangedListeners: MutableList<OnViewChangedInRectListener>
targetRect
Link copied to clipboard
private val targetRect: Rect
目标矩形区域
view
Link copied to clipboard
private val view: View
目标视图