Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 251a3e8b authored by Winson Chung's avatar Winson Chung Committed by Automerger Merge Worker
Browse files

Merge "Ensure page scrolls are initialized even for 0 children." into tm-dev am: 1e211e0c

parents ea0cc002 1e211e0c
Loading
Loading
Loading
Loading
+5 −4
Original line number Original line Diff line number Diff line
@@ -727,15 +727,16 @@ public abstract class PagedView<T extends View & PageIndicator> extends ViewGrou
            pageScrollChanged = true;
            pageScrollChanged = true;
        }
        }


        if (childCount == 0) {
            return;
        }

        if (DEBUG) Log.d(TAG, "PagedView.onLayout()");
        if (DEBUG) Log.d(TAG, "PagedView.onLayout()");


        pageScrollChanged |= getPageScrolls(pageScrolls, true, SIMPLE_SCROLL_LOGIC);
        pageScrollChanged |= getPageScrolls(pageScrolls, true, SIMPLE_SCROLL_LOGIC);
        mPageScrolls = pageScrolls;
        mPageScrolls = pageScrolls;


        if (childCount == 0) {
            onPageScrollsInitialized();
            return;
        }

        final LayoutTransition transition = getLayoutTransition();
        final LayoutTransition transition = getLayoutTransition();
        // If the transition is running defer updating max scroll, as some empty pages could
        // If the transition is running defer updating max scroll, as some empty pages could
        // still be present, and a max scroll change could cause sudden jumps in scroll.
        // still be present, and a max scroll change could cause sudden jumps in scroll.