Skip to content

Commit

Permalink
refactor:更新浮窗展示逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
Petterpx committed May 5, 2024
1 parent f65aca9 commit 5ba3579
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ abstract class FxBasicContainerView @JvmOverloads constructor(

open fun initView() {
helpers.forEach { it.initConfig(this) }
// 先隐藏view,等待初始化完成后再显示,避免位置的影响
visibility = View.INVISIBLE
}

override fun moveToEdge() {
Expand Down Expand Up @@ -92,6 +94,7 @@ abstract class FxBasicContainerView @JvmOverloads constructor(
if (!isInitLayout) return
isInitLayout = false
helpers.forEach { it.onInit() }
visibility = View.VISIBLE
}

override fun onInterceptTouchEvent(event: MotionEvent): Boolean {
Expand Down

0 comments on commit 5ba3579

Please sign in to comment.