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 ?
Asked
Active
Viewed 798 times
16

Saikrishna Rajaraman
- 3,205
- 2
- 16
- 29

harisk92
- 1,088
- 1
- 14
- 24
-
Hi. Did you find a solution? – VipulKumar Aug 23 '18 at 07:55
-
@VipulKumar I think I did I was messing with leanback back then. – harisk92 Aug 23 '18 at 08:31
-
Okay. Please let me know if you figured out how. I'm stuck and there is no help. – VipulKumar Aug 23 '18 at 08:35
-
.. what does the scrolling in Netflix look like? – товіаѕ Oct 02 '18 at 12:34
-
did you find an answer? – Zion Aronov Jun 23 '21 at 09:57
2 Answers
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