This was mentioned on these forums before, but from a different perspective.
Whenever I scroll my ScrollView down, the EditText nearest to the top of the screen gets focus. I simply need to ensure that this focus shift never happens or is diverted.
Under the _FocusChanged Sub for the EditTexts, I put in:
Which isn't a perfect solution because it doesn't distinguish between actual focus changed based on clicking and the "auto focus" caused by the ScrollView, but this code does nothing anyway.
Where do I put this focus diversion code so that the EditTexts lose their focus when the ScrollView gives them focus?
Thanks.
--
Whenever I scroll my ScrollView down, the EditText nearest to the top of the screen gets focus. I simply need to ensure that this focus shift never happens or is diverted.
Under the _FocusChanged Sub for the EditTexts, I put in:
B4X:
If HasFocus = True Then
If usOddsText.Text = "" Then
dummyEdit.Visible = True
dummyEdit.RequestFocus
p.HideKeyboard(Activity)
dummyEdit.Visible = False
End If
End If
Which isn't a perfect solution because it doesn't distinguish between actual focus changed based on clicking and the "auto focus" caused by the ScrollView, but this code does nothing anyway.
Where do I put this focus diversion code so that the EditTexts lose their focus when the ScrollView gives them focus?
Thanks.
--