Dianzoa Active Member Licensed User May 23, 2019 #1 Hello. I have tried the cardview example, works great, but the problem is that the activity in which the panel is created is larger than the panel itself. So for many cards, there is a lot of space in between. It is possible to adapt the activity (parent) to the size only of the panel in which it is loaded? Image: If I have mutiple cards results, the space between them is the gray space at the botton of the panel.
Hello. I have tried the cardview example, works great, but the problem is that the activity in which the panel is created is larger than the panel itself. So for many cards, there is a lot of space in between. It is possible to adapt the activity (parent) to the size only of the panel in which it is loaded? Image: If I have mutiple cards results, the space between them is the gray space at the botton of the panel.
DonManfred Expert Licensed User Longtime User May 23, 2019 #2 Upload a small project which shows the issue. Upvote 0
Dianzoa Active Member Licensed User May 23, 2019 #3 DonManfred said: Upload a small project which shows the issue. Click to expand... This is a variant of the card example from Erel. I just put a little labels, and see how that blue background which is the activity where the card is created occupy much more space than his children panel. I need the activity adapts to the panel children, so the cards are 1 below the other. Attachments small_cards.zip small_cards.zip 480.8 KB · Views: 427 Upvote 0
DonManfred said: Upload a small project which shows the issue. Click to expand... This is a variant of the card example from Erel. I just put a little labels, and see how that blue background which is the activity where the card is created occupy much more space than his children panel. I need the activity adapts to the panel children, so the cards are 1 below the other.
Erel B4X founder Staff member Licensed User Longtime User May 24, 2019 #4 The layout in the first post is wrong. You are not using anchors correctly. Best to watch the visual designer video tutorial. Panel1 shouldn't be anchored to the top only (or change the variant size and make it much shorter). Upvote 0
The layout in the first post is wrong. You are not using anchors correctly. Best to watch the visual designer video tutorial. Panel1 shouldn't be anchored to the top only (or change the variant size and make it much shorter).
Dianzoa Active Member Licensed User May 24, 2019 #5 This is what I get, but I want a smaller card, it's too big for a few info. Erel said: The layout in the first post is wrong. You are not using anchors correctly. Best to watch the visual designer video tutorial. Panel1 shouldn't be anchored to the top only (or change the variant size and make it much shorter). Click to expand... Ok! Thanks, I was drowning in a drop of water lol, just adjust the height of the panel before loading the designer file do the trick Code: Copy Dim height As Int = 150dip If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then height = 310dip p.SetLayoutAnimated(0, 0, 0, Width, height) p.LoadLayout("card1") Just play around with the height and it works. Upvote 0
This is what I get, but I want a smaller card, it's too big for a few info. Erel said: The layout in the first post is wrong. You are not using anchors correctly. Best to watch the visual designer video tutorial. Panel1 shouldn't be anchored to the top only (or change the variant size and make it much shorter). Click to expand... Ok! Thanks, I was drowning in a drop of water lol, just adjust the height of the panel before loading the designer file do the trick Code: Copy Dim height As Int = 150dip If GetDeviceLayoutValues.ApproximateScreenSize < 4.5 Then height = 310dip p.SetLayoutAnimated(0, 0, 0, Width, height) p.LoadLayout("card1") Just play around with the height and it works.