Dynamic Cardview Fill Parent

Hello everyone,
I am creating 4 Cardviews in a horizontal arrangement.
Cards are dynamic. I want the width to be fill parent.
From what I’ve learned, -1 is automatic and -2 is fill parent, right?

Here we have 4 non-dynamic cards with width in fill parent.

Summary

Why doesn’t it happen when I do this?

Summary

image

Only that happens…

For each number
From = 1 (on your block is 0)
To = 4 (or last number)
By = 1

1 Like

Creating component zero doesn’t seem to me to be the reason. I also tested starting with 1.
The reason I use 0 there, is that the first component is not getting the color I defined.
So I create component zero and delete. Once that’s done, the rest will have the defined color.

Here is the png of the blocks. Take the test if you wish.

Summary

yes . I’ve tried and got the same result. I suggest you use dynamic component extension by of yusuf cihan

2 Likes

But is that right? Put the first one to fill everything? and the others should appear?

1 Like

@sugarlesscreator , @Rogerio_Rios .
Yes, I left the elevation and the rest at 0.

It should be simpler to do this. I don’t believe I’m doing it the wrong way. But something there is not working.

Another point I noticed was when I tried to define the margin. Maybe I’m referring to the component the wrong way, but that gives me an error.

Summary

image

I will test the Yusuf extension. Thank you for your help!

I believe it will be your solution :+1:

1 Like

Do you want to create this dynamic Card view in bottom menu or inside the card view present in bottom menu as your container is bottom menu so the card view is taking width and height according to the bottom menu that is the problem

1 Like

But if my arrangement is 100px height (example) and my Card 70px, the height will be ok, right? Sliding sideways shouldn’t do that.

Yes that true if you wants to make all the 4 card of this size then you must use a horizontal scrolling arrangement or or you have to decrease the size ok

1 Like

And also if you are creating dynamic cards why you want non dynamic remove them they are useless

1 Like

Normally, to make it responsive, I just leave the horizontals in fill parent. This divides each component equally.

Yes but don’t do that as the screen sizing is by default responsive in kodular so don’t worry and remove then but don’t forget to make a backup

1 Like

Actually, as for the cards in the bottom menu, it was just for testing. I’m trying to develop the entire screen dynamically. Just to see how it looks.

1 Like

Then if you want to create dynamic cards like those then you height is ok but your width is not ok

1 Like

There is a way of creating width in percentage do you know that how to set it in percentage

2 Likes

Yes, using percentage would be an option. 4 items = 25%. However, fill parent in this case would be very useful in case a fifth item is inserted, you know? Just for practicality.

This is the layout of one of my apps. As you can see (I left a cardview colored) I made the lower menu using the full click of the cardview. There I have my images (buttons) and the label. With Cardview you can click on the entire component.

Summary

Did you got to your solution or not

1 Like

I haven’t been able to test it yet. But the extension that @sugarlesscreator suggested seems to serve this purpose. I will do this as soon as possible. Anyway, thanks for suggesting using the percentage.

1 Like

Hey, thanks! :ok_hand:t2:

1 Like