I imadreem New Member Licensed User Jul 20, 2023 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Jul 20, 2023 #2 You are doing something wrong. This is all that I can say based on the information you provided. Upvote 0
klaus Expert Licensed User Longtime User Jul 20, 2023 #3 How do you add the EditText views in the ScrollView ? Upvote 0
I imadreem New Member Licensed User Jul 20, 2023 #4 klaus said: How do you add the EditText views in the ScrollView ? Click to expand... above code is for defining edittext and here i retrive it when enter is pressed Upvote 0
klaus said: How do you add the EditText views in the ScrollView ? Click to expand... above code is for defining edittext and here i retrive it when enter is pressed
zed Well-Known Member Licensed User Jul 20, 2023 #5 Use code tags </> to display code. Something like that. [CODE lang="b4x" title="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[/CODE] Upvote 0
Use code tags </> to display code. Something like that. [CODE lang="b4x" title="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[/CODE]
LucaMs Expert Licensed User Longtime User Jul 20, 2023 #6 Tip: It's almost always better to use CustomListView instead of ScrollView. Even in your case, since it seems to me that all elements have the same layout (which would be better to load from file). Last edited: Jul 20, 2023 Upvote 0
Tip: It's almost always better to use CustomListView instead of ScrollView. Even in your case, since it seems to me that all elements have the same layout (which would be better to load from file).
klaus Expert Licensed User Longtime User Jul 20, 2023 #7 You need to add Dim sItemqty insides of the For / Next loop. Upvote 0
I imadreem New Member Licensed User Jul 20, 2023 #8 zed said: Use code tags </> to display code. Something like that. [CODE lang="b4x" title="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[/CODE] Click to expand... thank you Zed i used your code and it is working perfect Upvote 0
zed said: Use code tags </> to display code. Something like that. [CODE lang="b4x" title="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[/CODE] Click to expand... thank you Zed i used your code and it is working perfect