Android Question RequestFocus is not working for some fields

AndroidMadhu

Active Member
Licensed User
Hello
I am trying to place the cursor when I am press the enter button at my Device.
But I am not able to continuously focus/place the cursor at the test field. If I press Enter then again I need to manually select the text field to focus the cursor.

The below is the code:
B4X:
Sub edtQty_EnterPressed
If edtBarcodeData.Text.Trim.Length>0 Then
insertBarcode(edtBarcodeData.Text)
updateProdName(edtBarcodeData.Text,edtQty.Text)
'ShowBarcode
edtBarcodeData.Text=""
edtQty.Text=""
edtBarcodeData.RequestFocus
End If
edtBarcodeData.RequestFocus
End Sub



please advice
 
Top