In one of my projects, I have an activity which lists products in a custom list view. When a button is tapped in the list, a panel is made visible which contains an ACSpinner and an ACEditText, the idea being the user selects a size from the spinner, then enters a number of items in the text. I open the spinner using this code
This all works as expected.
When the spinner value is selected, I want to move the focus to the ACEditText, so I have this :
The trouble is, the first time I select a value in the spinner, the keyboard doesn't show. If I tap the spinner and pick a value again, the keyboard does show. I've tried various different combinations of setting focus on other views first, using edtCountQuantity.RequestFocus, remove the custom keyboard filter, using sleep and even DoEvents (the horror...) but nothing seems to work.
Does anybody have any idea what I'm doing wrong?
Thanks,
Darren
B4X:
Dim r As Reflector
r.Target = spnCountSizes
r.RunMethod("performClick")
This all works as expected.
When the spinner value is selected, I want to move the focus to the ACEditText, so I have this :
B4X:
Sub spnCountSizes_ItemClick(pos As Int, my_val As Object)
IME1.SetCustomFilter(edtCountQuantity, edtCountQuantity.INPUT_TYPE_DECIMAL_NUMBERS,"01234567890.-")
IME1.ShowKeyboard(edtCountQuantity)
End Sub
The trouble is, the first time I select a value in the spinner, the keyboard doesn't show. If I tap the spinner and pick a value again, the keyboard does show. I've tried various different combinations of setting focus on other views first, using edtCountQuantity.RequestFocus, remove the custom keyboard filter, using sleep and even DoEvents (the horror...) but nothing seems to work.
Does anybody have any idea what I'm doing wrong?
Thanks,
Darren