Skip to content

Commit

Permalink
fix: use post
Browse files Browse the repository at this point in the history
  • Loading branch information
trindadedev13 committed Dec 21, 2024
1 parent 3f4ceb5 commit 6855a87
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ constructor(
events.state.initialBound = 100f
events.state.targetBound = resources.displayMetrics.heightPixels.toFloat()
events.state.currentBound = events.state.initialBound
layoutParams.height = events.state.initialBound.toInt()
requestLayout()
post {
layoutParams.height = events.state.initialBound.toInt()
requestLayout()
}

setOnTouchListener { view, event ->
when (event.action) {
Expand Down

0 comments on commit 6855a87

Please sign in to comment.