Skip to content

Commit 9853455

Browse files
committed
fix: 兼容insets的消费逻辑
1 parent df94bea commit 9853455

File tree

1 file changed

+3
-3
lines changed
  • inputview/src/main/kotlin/com/xiaocydx/inputview

1 file changed

+3
-3
lines changed

inputview/src/main/kotlin/com/xiaocydx/inputview/InputView.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,12 @@ class InputView @JvmOverloads constructor(
243243
super.requestFitSystemWindows()
244244
}
245245

246-
override fun dispatchApplyWindowInsets(insets: WindowInsets?): WindowInsets {
247-
val applyInsets = super.dispatchApplyWindowInsets(insets)
246+
override fun dispatchApplyWindowInsets(insets: WindowInsets): WindowInsets {
247+
super.dispatchApplyWindowInsets(insets)
248248
// 尝试消费PendingChange,在处理完WindowInsets后,创建、添加、移除子View
249249
consumePendingChange()
250250
isApplyInsetsRequested = false
251-
return applyInsets
251+
return insets
252252
}
253253

254254
/**

0 commit comments

Comments
 (0)