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