i need to create a view that will allow longer view that actual screen (too many items)
searching the forum brought up scrollview
i tried to find a sample as i couldn't find my way with it
is there a simple sample for a scrollview with a few buttons on it so i can use it for my needs?
thanks
what you are doing is wrong
you create a panel with height 100%y and add it to the activity then you create the sv inner panel height also to 100%. so how should the height be larger then 100%y if you set both to 100%y???
this is how you should do it
B4X:
Sub Globals
Dim sv As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(1000dip) 'height of the panel in Layout
Activity.AddView(sv,0,0,100%x,100%y)
sv.Panel.LoadLayout("Layout")
End Sub
Update: As several other libraries depend on xCustomListView library, it is no longer recommended to use the code module. Use the library instead. There are several extension classes that add more features to xCLV. They are listed at the end of this post. Video tutorial: xCustomListView is...
Update: As several other libraries depend on xCustomListView library, it is no longer recommended to use the code module. Use the library instead. There are several extension classes that add more features to xCLV. They are listed at the end of this post. Video tutorial: xCustomListView is...
You can define the scrollview (SCV) by the designer, in my case I made it on top third of the screen, then set the internal panel size and added by code a imageview (Iv1) . You can add more views to the internal panel.
You can define the scrollview (SCV) by the designer, in my case I made it on top third of the screen, then set the internal panel size and added by code a imageview (Iv1) . You can add more views to the internal panel.
my plan is not to add a table or list like the ample i was referred to above
what want to do is have a layout that is longer that actual screen height so i can add textedits and buttons
if possible to take existing layout and add to it the ability to scroll as i need to add more elements
this i can't find
so from your sample code i see you load LV1 - can load to it my panel or layout and by that have the scroll ability?
my app is B4A
i did look at it as suggested above but from the sample i couldn't get to what i wanted
i don't need a scrolling list as in the sample, i need a form with buttons and textedits
the best will be the ability to take my existing views and load them into that "magical" customlistview
please mind that my app is classic b4a and quite old one
what you are doing is wrong
you create a panel with height 100%y and add it to the activity then you create the sv inner panel height also to 100%. so how should the height be larger then 100%y if you set both to 100%y???
this is how you should do it
B4X:
Sub Globals
Dim sv As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(1000dip) 'height of the panel in Layout
Activity.AddView(sv,0,0,100%x,100%y)
sv.Panel.LoadLayout("Layout")
End Sub
what you are doing is wrong
you create a panel with height 100%y and add it to the activity then you create the sv inner panel height also to 100%. so how should the height be larger then 100%y if you set both to 100%y???
this is how you should do it
B4X:
Sub Globals
Dim sv As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(1000dip) 'height of the panel in Layout
Activity.AddView(sv,0,0,100%x,100%y)
sv.Panel.LoadLayout("Layout")
End Sub
what you are doing is wrong
you create a panel with height 100%y and add it to the activity then you create the sv inner panel height also to 100%. so how should the height be larger then 100%y if you set both to 100%y???
this is how you should do it
B4X:
Sub Globals
Dim sv As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(1000dip) 'height of the panel in Layout
Activity.AddView(sv,0,0,100%x,100%y)
sv.Panel.LoadLayout("Layout")
End Sub
what you are doing is wrong
you create a panel with height 100%y and add it to the activity then you create the sv inner panel height also to 100%. so how should the height be larger then 100%y if you set both to 100%y???
this is how you should do it
B4X:
Sub Globals
Dim sv As ScrollView
End Sub
Sub Activity_Create(FirstTime As Boolean)
sv.Initialize(1000dip) 'height of the panel in Layout
Activity.AddView(sv,0,0,100%x,100%y)
sv.Panel.LoadLayout("Layout")
End Sub