mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2024-11-23 11:31:33 +01: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…
Reference in New Issue
Block a user