Fixed Api bug in DragSortListView

This commit is contained in:
Nite 2020-07-04 09:20:27 +02:00
parent f5748d7dc0
commit aae40c076e
No known key found for this signature in database
GPG Key ID: 1D1AD59B1C6386C1
1 changed files with 3 additions and 1 deletions

View File

@ -2933,7 +2933,9 @@ public class DragSortListView extends ListView {
// always do scroll
mBlockLayoutRequests = true;
setSelectionFromTop(movePos, top - padTop);
// This cast is a workaround of an API bug, see https://issuetracker.google.com/issues/37045361
((ListView)DragSortListView.this).setSelectionFromTop(movePos, top - padTop);
DragSortListView.this.layoutChildren();
invalidate();