mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
Fix cross_axis_alignment in pager with wrap_content mode
commit_hash:297303a48c27c16712e2d2b28c6bede1a64481d0
This commit is contained in:
+2
-1
@@ -27,7 +27,8 @@ internal class DivPagerPageLayout(
|
||||
if (childCount == 0) return super.onMeasure(widthMeasureSpec, heightMeasureSpec)
|
||||
val lp = getChildAt(0).layoutParams
|
||||
val isHorizontal = orientationProvider() == ViewPager2.ORIENTATION_HORIZONTAL
|
||||
if (isHorizontal) {
|
||||
if (isHorizontal && (!isUnspecified(widthMeasureSpec) || MeasureSpec.getSize(widthMeasureSpec) != 0) &&
|
||||
(!isUnspecified(heightMeasureSpec) || MeasureSpec.getSize(heightMeasureSpec) != 0)) {
|
||||
minimumHeight = getMinimumSize(heightMeasureSpec)
|
||||
} else {
|
||||
minimumWidth = getMinimumSize(widthMeasureSpec)
|
||||
|
||||
Reference in New Issue
Block a user