Android Question Problems with scrollview

invaderwt

Member
Licensed User
Longtime User
B4X:
sub global

  Private scrv1 As ScrollView
   Private img_receita As ImageView
   Private svw_phone As ScrollView
   Private panel_phone_receita As Panel
end sub

sub add view

Activity.LoadLayout("scroll_view_phone")
'    Dim svw As ScrollView2D
'    svw.Initialize(100%x,100%y,"svw")
'    svw.Panel.LoadLayout("receita_phone")
'    svw.Color= Colors.Transparent
'    svw.FullScroll(2,True,True)
'   
'    svw.ScrollbarsVisibility(True,True)
'    svw.Height = 10000
'    Activity.AddView(svw,0%x,0%y,100%x,1000)
   
    svw_phone.Panel.LoadLayout("receita_phone")
    svw_phone.FullScroll(True)
    svw_phone.Height = 10000
'Dim p As Panel
'p.Initialize("")
'p= svw_phone.Panel
'p.AddView(panel_phone_receita,0,0,panel_phone_receita.Width,panel_phone_receita.Height)


I have a panel more larger than the Activity so i tried put in a scrollview and nothing happen olny my first spot show up I can´t scrolled to rest of the panel in horizontal way.
Thanks for help
 

strat

Active Member
Licensed User
Longtime User
You don't need to adjust scrollview's size larger than the screen height. You should adjust scrollview's panel size.

B4X:
svw_phone.height=100% y
svw_phone.Panel.height=10000
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
What do you have in the layout.
Setting svw_phone.Panel.height = 10000 will probably be too much.
You should set it to height needed by the views at the bottom of the layout.
By the way you should use dip values and not 'pure' pixel values, 10000dip instaed of 10000.
 
Upvote 0
Top