iOS Question This code is LoadLayout ASViewPager to ScrollView Works well in B4A Why do not work in B4I

AlfaizDev

Well-Known Member
Licensed User
B4X:
If Root.Width > Root.Height Then
        'Log("landscape")
        Root.LoadLayout("Lu_ScrollView")
        'ScrollView1.Top=0
        ScrollView1.Panel.LoadLayout("lu_ASViewPager")
        ScrollView1.Panel.Height =Root.Width + Root.Height+50dip
        'ScrollView1.Panel.c
        ASViewPager1.Base.Height=Root.Width + Root.Height '900dip '100%y 'ScrollView1.Panel.Height
        'ASViewPager1
    Else
        Log("tool")
        Root.LoadLayout("Lu_ScrollView")
        'ScrollView1.Top=0
        ScrollView1.Panel.LoadLayout("lu_ASViewPager")
        ScrollView1.Panel.Height = Root.Height
    '    ScrollView1.ContentHeight = Root.Height
        ASViewPager1.Base.Height=ScrollView1.Height
    End If

thanks
 

Alexander Stolte

Expert
Licensed User
Longtime User
I dont know what you are trying todo, but if you switch to xCustomListView and add the ASViewPager as item to the list, then it works.
 

Attachments

  • B4X Example.zip
    11.5 KB · Views: 121
Upvote 0

AlfaizDev

Well-Known Member
Licensed User
I dont know what you are trying todo, but if you switch to xCustomListView and add the ASViewPager as item to the list, then it works.

I'll explain what I'm trying to do.
I load many photos to ASViewPager
When the phone is in portrait mode, the image expands on each screen.
But the The problem are when the phone is rotated into landscape mode
Here I need to load ASViewPager on ScrollView
So the user can go down the picture.
 
Last edited:
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
Does the image have to take up the whole screen?

You can use the ZoomImageView, then the user can zoom in the image.
 
Upvote 0
Top