Skip to content

Commit 1d12b2d

Browse files
Fix #27
1 parent 249a228 commit 1d12b2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

loadingstateview/src/main/java/com/dylanc/loadingstateview/LoadingStateView.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ class LoadingStateView @JvmOverloads constructor(
110110

111111
private fun DecorViewDelegate.createDecorView() =
112112
onCreateDecorView(LayoutInflater.from(contentView.context)).also { decorView ->
113-
contentView.layoutParams?.let { decorView.layoutParams = it }
113+
contentView.layoutParams?.let {
114+
decorView.layoutParams = if (it is ConstraintLayout.LayoutParams) ConstraintLayout.LayoutParams(it) else it
115+
}
114116
}
115117

116118
/**

0 commit comments

Comments
 (0)