Android Question multiple edittext in scrollview

imadreem

New Member
Licensed User
Hello everyone


i am using multiple edittext in a scrollview
when checking for enterpressed or gotfocus i always get the data of the last edittext in the scrollview not the one i am using

Please help
 

imadreem

New Member
Licensed User
How do you add the EditText views in the ScrollView ?
1689854370040.png

above code is for defining edittext

1689854497083.png

and here i retrive it when enter is pressed
 
Upvote 0

zed

Well-Known Member
Licensed User
Use code tags </> to display code.

Something like that.
B4X:
Dim edtxt(listitems.size) As B4XView 'number of edittext
For i = 0 To listitems.size -1 'your list
    Dim myEdTXT As EditText
    myEdTXT.Initialize("etView")
    edTXT(i) = myEdTXT
    edtxt(i).Tag = i
Next
 
Upvote 0

imadreem

New Member
Licensed User
Use code tags </> to display code.

Something like that.
B4X:
Dim edtxt(listitems.size) As B4XView 'number of edittext
For i = 0 To listitems.size -1 'your list
    Dim myEdTXT As EditText
    myEdTXT.Initialize("etView")
    edTXT(i) = myEdTXT
    edtxt(i).Tag = i
Next
thank you Zed
i used your code and it is working perfect
 
  • Like
Reactions: zed
Upvote 0
Top