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

Commit 753c114d authored by Yigit Boyar's avatar Yigit Boyar
Browse files

Update RecyclerView scroll listener to the new API

Bug: 16054949
Change-Id: I264a701e8b298a08f09bb30284099734054d518c
parent 7a56ea35
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba
        }
    }

    private final class PreloadController implements RecyclerView.OnScrollListener {
    private final class PreloadController extends RecyclerView.OnScrollListener {
        private final RecyclerView mRecyclerView;

        private int mOldScrollState;
@@ -322,7 +322,7 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba
        }

        @Override
        public void onScrollStateChanged(int state) {
        public void onScrollStateChanged(RecyclerView recyclerView, int state) {
            switch (mOldScrollState) {
                case RecyclerView.SCROLL_STATE_SETTLING: {
                    if (state == RecyclerView.SCROLL_STATE_IDLE
@@ -341,11 +341,6 @@ class PrintPreviewController implements MutexFileProvider.OnReleaseRequestCallba
            mOldScrollState = state;
        }

        @Override
        public void onScrolled(int dx, int dy) {
            /* do nothing */
        }

        public void startPreloadContent() {
            PageAdapter pageAdapter = (PageAdapter) mRecyclerView.getAdapter();