Activity.LoadLayout("asset")
svDetails.Panel.LoadLayout("assetdetails")
svDetails.Panel.Height = pnlDetails.Height
Sub Globals
Dim svDetails As ScrollView
Dim pnlDetails As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
svDetails.Initialize(1000dip)
svDetails.Panel.LoadLayout("assetdetails")
' svDetails.Panel.Height = pnlDetails.Height
End Sub
We could easier help you if you posted your project as a zip file (IDE menu Files / Export As Zip).
Best regards.
svDetails.Initialize(0)
Activity.AddView(svDetails,0,0,100%x,100%y)
pnlDetails.Initialize("")
svDetails.Panel.AddView(pnlDetails,0,0,svDetails.Width,svDetails.Height)
For i=1 To 11
k= ((70*i)-60)
pnlDetails.AddView(CodeModule.EditTextCreator("EditText"&i),0,k,310dip,60dip)
Next
svDetails.Panel.Height=pnlDetails.Height
pnlDetails.Initialize("")
Activity.AddView(pnlDetails,0,0,100%x,100%y)
svDetails.Initialize(0)
pnlDetails.AddView(svDetails, 0, 0, pnlDetails.Width,pnlDetails.Height)
For i=1 To 11
k= ((70*i)-60)
svDetails.Panel.AddView(CodeModule.EditTextCreator("EditText"&i),0,k,310dip,60dip)
Next
svDetails.Panel.Height=pnlDetails.Height
I have just had to create a form with 33 pages of questions !
I created the pages dynamically using the AHViewPager library and then dynamically adding the views to each page, giving 230 questions in total.
This is created on my Nexus 7 in approx 5 seconds, so acceptable to me and my client
svDetails.Initialize(0)
Activity.AddView(svDetails, 0, 0, 100%x, 100%y)
pnlDetails.Initialize("")
svDetails.Panel.AddView(pnlDetails,0,0,svDetails.Width,svDetails.Height)
For i = 0 To 10
k= i * 60dip
pnlDetails.AddView(CodeModule.EditTextCreator("EditText" & (i + 1)), 0, k, 310dip, 60dip)
Next
pnlDetails.Height = i * 60dip
svDetails.Panel.Height=pnlDetails.Height
pnlDetails.Initialize("")
Activity.AddView(pnlDetails,0,0,100%x,100%y)
svDetails.Initialize(0)
pnlDetails.AddView(svDetails, 0, 0, pnlDetails.Width,pnlDetails.Height)
For i = 0 To 10
k = i * 60dip
svDetails.Panel.AddView(CodeModule.EditTextCreator("EditText" & (i + 1)), 0, k, 310dip, 60dip)
Next
pnlDetails.Height = i * 60dip
svDetails.Panel.Height = pnlDetails.Height
It is possible to add other events to an EditText with the Reflection library like Click, LongClick, Touch etc..