B4J Question [ABMaterial] FlexWall Problem - SOLVED

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
The image below shows the FlexWall from ABMateril's demo here: http://prd.one-two.com:51042/demo/HelperFlexWallPage/abmaterial-flexwall.html

pic1.png


When I copy-paste the code from the demo into my app (and also copy-paste the folder of the images used in the flexwall into my app folder), I get the result shown below:

pic2.png


What should I change to get the FlexWall picture layout of the demo?
 

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
It's your grid's visibility that controls it...
I don't think it is a grid visibility issue.
After all, the flexwall page in my app is an exact copy of abmaterial's demo page, which works OK.
The setup is very simple:
In Buildpage:

B4X:
page.AddRows(4,True, "").AddCells12(1,"")
page.BuildGrid

In ConnectPage:
B4X:
Dim flexWall As ABMFlexWall
flexWall.Initialize(page, "flexwall", 350)
For i = 1 To 20
        flexWall.AddImage(ABMShared.BuildImage(page, "img" & i, "../images2/" & i & ".jpg",1, i & ".jpg"), 1024, 768)      
Next  
page.Cell(2,1).AddComponent(flexWall)

Note that initialization happens in ConnectPage, which addresses Mashiane's suggestion here (Post 14):
https://www.b4x.com/android/forum/t...rial-a-personal-experiment.73045/#post-466565


In fact, the only difference I see between my app and Mashiane's and ABMaterial's Demo app is that my SideBar Menu is always hidden - although I cannot think why hiding the menu would cause the flexwall to have this behaviour.
Anyway, I will try my app's flexwall tomorrow without hiding the SideBar menu and report back.
 
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
Actually it is possible that the hidden sidebar causes this: the sidebar is in Materialize CSS normally only hidden on phones or tablets, not desktops. So if it is hidden, it may affect the behaviour of the rest of the page as being seen as a phone or tablet.
 
Upvote 0

Philip Chatzigeorgiadis

Active Member
Licensed User
Longtime User
Actually it is possible that the hidden sidebar causes this: the sidebar is in Materialize CSS normally only hidden on phones or tablets, not desktops. So if it is hidden, it may affect the behaviour of the rest of the page as being seen as a phone or tablet.
I confirm that by setting the sidebar's visibility to ABM.SIDEBAR_AUTO or ABM.SIDEBAR_MANUAL_HIDEMEDIUMSMALL the flexwall is displayed properly.
Thank you all for pointing me in the right direction.
 
Upvote 0
Top