Hi, I'm practicing with the ScrollViews, but I need help.
I have 1 main screen called: "main.bal" that contains 1 ScrollView and 1 HorizontalScrollView on the same screen.
The first ScrollView works perfectly and loads my layer: "contenido.bal".
My HorizontalScrollView must load "horizontal.bal" the content is loaded, because my activity has the purple background color, but it does not show me the content that corresponds to the "horizontal.bal" layer. Both layers have been adjusted by Script - General, but I just can not load the content in the HorizontalScrollView.
Annex images and project, please wait and help me, I am very confused.
Thank you very much to all.
Main.bal
horizontal.bal
Scripts - General de horizontal.bal
I have 1 main screen called: "main.bal" that contains 1 ScrollView and 1 HorizontalScrollView on the same screen.
The first ScrollView works perfectly and loads my layer: "contenido.bal".
My HorizontalScrollView must load "horizontal.bal" the content is loaded, because my activity has the purple background color, but it does not show me the content that corresponds to the "horizontal.bal" layer. Both layers have been adjusted by Script - General, but I just can not load the content in the HorizontalScrollView.
Annex images and project, please wait and help me, I am very confused.
Thank you very much to all.
Main.bal
horizontal.bal
B4X:
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private ScrollView1 As ScrollView
Private PanelContenido As Panel
Private HorizontalScrollView1 As HorizontalScrollView
Private PanelHorizontal As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
ScrollView1.Panel.LoadLayout("contenido")
ScrollView1.Panel.Height = PanelContenido.Height
HorizontalScrollView1.Panel.LoadLayout("horizontal")
HorizontalScrollView1.Panel.Width = PanelHorizontal.Width
HorizontalScrollView1.Panel.Height = PanelHorizontal.Height
End Sub
Scripts - General de horizontal.bal
B4X:
AutoScaleAll
PanelHorizontal.Width = 200%x
PanelHorizontal.Top = 0
PanelHorizontal.Left = 0
PanelHorizontal.Height = 45%y
Button1.Width = 20%x
Button1.Height = 10%y
Button1.Top = 0
Button1.Left = 0
Panel2.Width = 20%x
Panel2.Height = 10%y
Panel2.Top = 0
Panel2.Left = 90%x
Panel3.Width = 20%x
Panel3.Height = 10%y
Panel3.Top = 0
Panel3.Left = 180%x