I have a simple textbox (edittext1.text) I add a few pages of text to it.
scrolling thru it is way to slow. How can I speed it up to scroll like when viewing a web page or something
Tried on my S4 and my Experia Z2 tablet. Same slowness
I think it's just adding a vertical scrollview, add a label to it and set the inner panel to the size of the label.
B4X:
Sub Globals
Private ScrollView1 As ScrollView
Dim mytext As Label
Dim txt As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
mytext.Initialize("")
ScrollView1.Panel.AddView(mytext,0,0,ScrollView1.Width,2000)
ScrollView1.Panel.Height=2000
txt="this is a very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong text"
mytext.Text=txt.Replace("o","o"&CRLF)
End Sub
That works. but still a lot of crap just to have normal scrolling? then I still have to determine how many lines
of text is in the string in order to make the panel long enough to show all the ( 902+/-) lines of text.
I have to put that "45000" in there to show all the lines. too high of a number and scrolling is slow again.
Too low of a number and all lines don't show.