mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-04-03 19:00:43 +02:00
Don't pass negative values to setSelectionFromTop()
This commit is contained in:
parent
3ff78c2cbf
commit
8e42ee8022
@ -272,7 +272,8 @@ public abstract class EditPGN extends AppCompatActivity {
|
||||
ListView lv = binding.listView;
|
||||
currentFilePos = defaultFilePos;
|
||||
int itemNo = getItemNo(gamesInFile, defaultFilePos);
|
||||
lv.setSelectionFromTop(itemNo, 0);
|
||||
if (itemNo >= 0)
|
||||
lv.setSelectionFromTop(itemNo, 0);
|
||||
lv.setFastScrollEnabled(true);
|
||||
lv.setOnItemClickListener((parent, view, pos, id) -> {
|
||||
selectedGi = aa.getItem(pos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user