Hello Community,
I am writing an app where one of my spinners has hundreds of items in it alphabetically. Instead of making a user scroll though hundreds of entries, I have created 26 buttons (A-Z) that should allow them to 'jump' to the right area of the spinner to find their choice.
The problem is, I cannot always get the spinner to 'move to' the correct area every time.
Attached is a very simple example of how I move the spinner around and how it is not cooperating.
---
EXPERIMENT #1:
Run the app for the first time. Spinner defaults to "A".
Without touching the spinner, click Button1 (M).
Tap the spinner. Drop down selections start at "M" item (correct).
Tap the spinner to close it. (No not make a selection.)
Now click button 2 (D).
Spinner shows "D".
Tap the spinner. Drop down selections still start at "M" item (wrong).
Tap the spinner. Select "P".
Tap the spinner. Drop down starts at "P" item (correct).
Tap the spinner to close it. (No not make a selection.)
Now click button 2 (D).
Spinner shows "D".
Tap the spinner. Drop down still starts at the "P" item (wrong).
Tap the spinner. Select "O"
Tap the spinner. Drop down shows area of the "O" item (correct).
Tap the spinner to close it. (No not make a selection.)
Now click button 1 (M).
Spinner shows "M".
Tap the spinner. Drop down shows area of the "O" item (wrong).
---
Experiment #2:
Run the app for the first time. Spinner defaults to "A".
Tap the spinner to view the drop down selections. Selections start at "A" item (correct).
Tap spinner again to close it without making a selection.
Click button 1 (M).
Spinner shows "M".
Tap the spinner. Drop down selections still start at "A" item (wrong).
(This just worked fine in Experiment #1; although this time peeking at the spinner first prevented it from moving.)
---
I cannot get this app to crash in the same way, but in the real app, after doing the above routine multiple times, another routine (not in this project) crashes because of the index. If I always scroll through the spinner instead of moving it around by index, the app never crashes.
What is a better / the right way to move to spinner around to select items that may be hundreds of items away from the present selection?
I am writing an app where one of my spinners has hundreds of items in it alphabetically. Instead of making a user scroll though hundreds of entries, I have created 26 buttons (A-Z) that should allow them to 'jump' to the right area of the spinner to find their choice.
The problem is, I cannot always get the spinner to 'move to' the correct area every time.
Attached is a very simple example of how I move the spinner around and how it is not cooperating.
---
EXPERIMENT #1:
Run the app for the first time. Spinner defaults to "A".
Without touching the spinner, click Button1 (M).
Tap the spinner. Drop down selections start at "M" item (correct).
Tap the spinner to close it. (No not make a selection.)
Now click button 2 (D).
Spinner shows "D".
Tap the spinner. Drop down selections still start at "M" item (wrong).
Tap the spinner. Select "P".
Tap the spinner. Drop down starts at "P" item (correct).
Tap the spinner to close it. (No not make a selection.)
Now click button 2 (D).
Spinner shows "D".
Tap the spinner. Drop down still starts at the "P" item (wrong).
Tap the spinner. Select "O"
Tap the spinner. Drop down shows area of the "O" item (correct).
Tap the spinner to close it. (No not make a selection.)
Now click button 1 (M).
Spinner shows "M".
Tap the spinner. Drop down shows area of the "O" item (wrong).
---
Experiment #2:
Run the app for the first time. Spinner defaults to "A".
Tap the spinner to view the drop down selections. Selections start at "A" item (correct).
Tap spinner again to close it without making a selection.
Click button 1 (M).
Spinner shows "M".
Tap the spinner. Drop down selections still start at "A" item (wrong).
(This just worked fine in Experiment #1; although this time peeking at the spinner first prevented it from moving.)
---
I cannot get this app to crash in the same way, but in the real app, after doing the above routine multiple times, another routine (not in this project) crashes because of the index. If I always scroll through the spinner instead of moving it around by index, the app never crashes.
What is a better / the right way to move to spinner around to select items that may be hundreds of items away from the present selection?