B baron Member Licensed User Longtime User Sep 1, 2013 #1 I cannot set the focus to a Spinner as I do for edit boxes. Am I missing a trick here?
Erel B4X founder Staff member Licensed User Longtime User Sep 1, 2013 #2 Why do you need to set the focus to the spinner? Focus in android is not needed in most cases as the user just touches the relevant view. Upvote 0
Why do you need to set the focus to the spinner? Focus in android is not needed in most cases as the user just touches the relevant view.
B baron Member Licensed User Longtime User Sep 1, 2013 #3 For ease of operation by the user. There are a dozen or so items which must be completed in order before the Save/Print button is clicked. When the user presses the Return key on the keyboard, my app sets the focus to the next view. If that is an EditBox, the keyboard remains on the screen, with the prompt identifying what input is expected. Upvote 0
For ease of operation by the user. There are a dozen or so items which must be completed in order before the Save/Print button is clicked. When the user presses the Return key on the keyboard, my app sets the focus to the next view. If that is an EditBox, the keyboard remains on the screen, with the prompt identifying what input is expected.
Erel B4X founder Staff member Licensed User Longtime User Sep 2, 2013 #4 Try this code: Code: Copy Dim r As Reflector r.Target = Spinner1 r.RunMethod2("setFocusable", True, "java.lang.boolean") r.RunMethod2("setFocusableInTouchMode", True, "java.lang.boolean") Upvote 0
Try this code: Code: Copy Dim r As Reflector r.Target = Spinner1 r.RunMethod2("setFocusable", True, "java.lang.boolean") r.RunMethod2("setFocusableInTouchMode", True, "java.lang.boolean")
B baron Member Licensed User Longtime User Sep 2, 2013 #5 Erel said: Try this code: Code: Copy Dim r As Reflector r.Target = Spinner1 r.RunMethod2("setFocusable", True, "java.lang.boolean") r.RunMethod2("setFocusableInTouchMode", True, "java.lang.boolean") Click to expand... Thanks Erel Upvote 0
Erel said: Try this code: Code: Copy Dim r As Reflector r.Target = Spinner1 r.RunMethod2("setFocusable", True, "java.lang.boolean") r.RunMethod2("setFocusableInTouchMode", True, "java.lang.boolean") Click to expand... Thanks Erel