Fix focus getting stuck by cycling within the same list item

This commit is contained in:
Alexander-- 2020-03-12 05:29:37 +06:59
parent fa6823599a
commit 1cc5a67d82
1 changed files with 6 additions and 0 deletions

View File

@ -98,6 +98,12 @@ public final class SuperScrollLayoutManager extends LinearLayoutManager {
continue;
}
if (view == focusedItem) {
// do not pass focus back to the item View itself - it makes no sense
// (we can still pass focus to it's children however)
continue;
}
int candidate = getDistance(sourcePosition, view, listDirection);
if (candidate < 0) {
continue;