Limit scrolling speed on ListRow
Asked Answered
A

2

16

I was looking at Netflix app and their scrolling behaviour.I would like to do the same but don't know where to start. I know how to override LayoutManager for RecyclerView(though I don't to save that as last resort). Is there easier way to control scrolling speed using RowPresenter ?

Apparent answered 1/12, 2017 at 11:15 Comment(5)
Hi. Did you find a solution?Obbard
@Obbard I think I did I was messing with leanback back then.Apparent
Okay. Please let me know if you figured out how. I'm stuck and there is no help.Obbard
.. what does the scrolling in Netflix look like?Monas
did you find an answer?Crimple
G
1

Leanback supports setting scrolling speed for BaseGridView from version 1.1.0-alpha03. You can set scrolling speed by using a method named setSmoothScrollSpeedFactor in all sub-classes of BaseGridView.

Grooved answered 28/12, 2022 at 12:31 Comment(0)
D
0

Implement the logic on your activity class, ovverride keys (OnKeyDown) on a way that will ignore the key event for 3-4 millis or sth.

@Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        long current = System.currentTimeMillis();
        boolean res = false;
        if (current - mLastKeyDownTime < 300) {
            res = true;
        } else {
            res = super.onKeyDown(keyCode, event);
            mLastKeyDownTime = current;
        }
        return res;
    }
Disquiet answered 10/7, 2019 at 10:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.