Skip to content

Commit

Permalink
修复在RecyclerView中滑动缓存导致的显示问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiqian committed Nov 6, 2023
1 parent f313ef3 commit 4e6e84c
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ abstract class BaseChildChart<C : BaseChildChartConfig> @JvmOverloads constructo
OnKEntitiesChangedListener {

// 管理matrix
private var childChartMatrixHelper: ChildChartMatrixHelper<C>? = null
private var childChartMatrixHelper =
ChildChartMatrixHelper(
stockChart,
this
)

// 显示区域
private val chartDisplayArea = RectF()
Expand Down Expand Up @@ -73,11 +77,6 @@ abstract class BaseChildChart<C : BaseChildChartConfig> @JvmOverloads constructo
override fun onAttachedToWindow() {
super.onAttachedToWindow()
stockChart.addOnKEntitiesChangedListener(this)
childChartMatrixHelper =
ChildChartMatrixHelper(
stockChart,
this
)
}

override fun onDetachedFromWindow() {
Expand Down

0 comments on commit 4e6e84c

Please sign in to comment.