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 ?

Saikrishna Rajaraman
  • 3,205
  • 2
  • 16
  • 29
harisk92
  • 1,088
  • 1
  • 14
  • 24

2 Answers2

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;
    }
A_rmas
  • 784
  • 2
  • 10
  • 26
0

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.

mahdi
  • 598
  • 5
  • 22