S SarahWard Banned Sep 10, 2011 #1 I have found that the Spinner view seems to have a limitation of about 250 entries, or thereabouts. I am trying to load over 500 entries into the spinner. Is this a hard limitation and would another view work better?
I have found that the Spinner view seems to have a limitation of about 250 entries, or thereabouts. I am trying to load over 500 entries into the spinner. Is this a hard limitation and would another view work better?
Erel B4X founder Staff member Licensed User Longtime User Sep 11, 2011 #2 There is no hard limit. Which error do you get? Upvote 0
S SarahWard Banned Sep 11, 2011 #3 Erel said: There is no hard limit. Which error do you get? Click to expand... Hi Erel I don't actually get an error. I load in over 500 names from a text file but only about 250 display in the spinner at runtime. Is it a List problem? I have been using a list to add them. Maybe I should use readline and do it line by line? This code loads three values per record (reference int, name string, name-latin string) and it only displays the first about 250-ish records even though there are about 520 records... words = File.ReadList(File.DirRootExternal, sdcard_folder & indexis) y = 1 For x = 0 To Index_size - 1 Step 3 'the 0 relates to the first entry in the file in .get(0) REFis(y) = words.Get(x) 'record ref NameCommonis(y) = words.Get(x+1) 'common name spinnerItems.Add(NameCommonis(y)) NameLatinis(y) = words.Get(x+2) 'latin name y = y + 1 'y counts thru the actual records Next Upvote 0
Erel said: There is no hard limit. Which error do you get? Click to expand... Hi Erel I don't actually get an error. I load in over 500 names from a text file but only about 250 display in the spinner at runtime. Is it a List problem? I have been using a list to add them. Maybe I should use readline and do it line by line? This code loads three values per record (reference int, name string, name-latin string) and it only displays the first about 250-ish records even though there are about 520 records... words = File.ReadList(File.DirRootExternal, sdcard_folder & indexis) y = 1 For x = 0 To Index_size - 1 Step 3 'the 0 relates to the first entry in the file in .get(0) REFis(y) = words.Get(x) 'record ref NameCommonis(y) = words.Get(x+1) 'common name spinnerItems.Add(NameCommonis(y)) NameLatinis(y) = words.Get(x+2) 'latin name y = y + 1 'y counts thru the actual records Next
Erel B4X founder Staff member Licensed User Longtime User Sep 11, 2011 #4 It is impossible to help without seeing your complete project. Just to be sure I created a small test that adds 2000 items and it works properly: Code: Copy Sub Activity_Create(FirstTime As Boolean) Dim s As Spinner s.Initialize("s") For i = 1 To 2000 s.Add("item " & i) Next Activity.AddView(s, 0, 0, 200dip, 100dip) End Sub Upvote 0
It is impossible to help without seeing your complete project. Just to be sure I created a small test that adds 2000 items and it works properly: Code: Copy Sub Activity_Create(FirstTime As Boolean) Dim s As Spinner s.Initialize("s") For i = 1 To 2000 s.Add("item " & i) Next Activity.AddView(s, 0, 0, 200dip, 100dip) End Sub
S SarahWard Banned Sep 12, 2011 #5 Erel said: It is impossible to help without seeing your complete project. Just to be sure I created a small test that adds 2000 items and it works properly: Code: Copy Sub Activity_Create(FirstTime As Boolean) Dim s As Spinner s.Initialize("s") For i = 1 To 2000 s.Add("item " & i) Next Activity.AddView(s, 0, 0, 200dip, 100dip) End Sub Click to expand... Thankyou, Erel It seems that the limitation went away when I stopped populating the spinner via a list view as per your code. I don't know for sure the list view was causing it but it works now. Thanks. Upvote 0
Erel said: It is impossible to help without seeing your complete project. Just to be sure I created a small test that adds 2000 items and it works properly: Code: Copy Sub Activity_Create(FirstTime As Boolean) Dim s As Spinner s.Initialize("s") For i = 1 To 2000 s.Add("item " & i) Next Activity.AddView(s, 0, 0, 200dip, 100dip) End Sub Click to expand... Thankyou, Erel It seems that the limitation went away when I stopped populating the spinner via a list view as per your code. I don't know for sure the list view was causing it but it works now. Thanks.