iOS Question [SOLVED] B4XPages + Drawer, 3 pages example, Drawer does not scroll when device rotate horizontal

WhiteWizard

Member
Licensed User
I'm drawing my menu on the Drawer, but when the phone get flipped horizontal, only a portion of the drawer can be seen. This is natural cos the device vertical resolution is greater that the horizontal one, but the problem is that the Drawer doesn't scroll down to show the rest of my menu options. I tried to add a ScrollView, and a Panel with a ScrollView with all the controls depending of that panel, but nothing happens.

Can this be done?
 

Semen Matusovskiy

Well-Known Member
Licensed User
Erel's B4XDrawer has scrollable menu. You can replace CustomListView by ScrollView and to place menu items on scrollview panel.
 

Attachments

  • B4XDrawer.zip
    33.5 KB · Views: 199
Upvote 0

WhiteWizard

Member
Licensed User
Maybe I am not understanding how the drawer works, I am using the CustomListView of "Page 2", to show news in my app. The first screen is Login and then it goes to page 2 where it shows news boxes using CLVExpandable. If the Drawer is also using the same CLV I don't even understand how it works.
Sin título.png
Sin título2.png
 
Upvote 0

WhiteWizard

Member
Licensed User
This is the Layout for the Left Drawer, it's composed by Labels and ImageViews
Te Page Resize event it's left unchaged

B4X:
Private Sub B4XPage_Resize (Width As Int, Height As Int)
    Drawer.Resize(Width, Height)
End Sub
1602166821696.png
 
Upvote 0

WhiteWizard

Member
Licensed User
Thanks to everyone for your replies. Indeed, in the Left Drawer you have to put a CustomListView and then create items as indicated by Erel in the B4XDrawer example. In my case I created an items Layout with a single Label and ImageView for the text and the icon of the option. Using the Divider and Press colors from from CLV gave me the separation and animation on pressing. And of course the vertical scroll works.
The missundertanding occurs cos in the "B4XPages, 3 Pages + Drawer" example, in the Left Drawer layout there's a single "Log out" button, so I believe that to populate my menu on the Drawer I just have to put my controls directly there, but then I look the other proyect (B4XDrawer alone), and then I realize that I have to put a CLV on the left drawer. It takes time...
 
Last edited:
Upvote 0
Top