Skip to content

Commit a179715

Browse files
committed
hidden content draggable fix.
1 parent e794391 commit a179715

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

expandable-horizontal-pager/src/main/java/com/commandiron/expandable_horizontal_pager/ExpandableHorizontalPager.kt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,23 +221,22 @@ fun ExpandableHorizontalPager(
221221
)
222222
}
223223
}
224-
},
224+
}
225+
.draggable(
226+
orientation = Orientation.Vertical,
227+
state = rememberDraggableState {},
228+
onDragStarted = {
229+
onTransform(!isExpanded)
230+
expand(this@BoxWithConstraints.maxHeight)
231+
}
232+
),
225233
shape = RoundedCornerShape(cornerSize),
226234
colors = CardDefaults.cardColors(
227235
containerColor = hiddenContentContainerColor,
228236
contentColor = hiddenContentContentColor
229237
)
230238
) {
231239
BoxWithConstraints(
232-
modifier = Modifier
233-
.draggable(
234-
orientation = Orientation.Vertical,
235-
state = rememberDraggableState {},
236-
onDragStarted = {
237-
onTransform(!isExpanded)
238-
expand(this@BoxWithConstraints.maxHeight)
239-
}
240-
),
241240
contentAlignment = Alignment.Center
242241
) {
243242
Column() {

0 commit comments

Comments
 (0)