Skip to content
Advertisement

Gridlayout height based on Label height in recycleview not aligned

I have managed to get the size of a box layout to change based on the corresponding Label height, however, it doesn’t line up perfectly and I cannot figure out why.

I have looked at adding offsets but have had no luck since it ended up making the issue worse

Thank you for any help

JavaScript
JavaScript

enter image description here ^ Image showing how the code above runs

Advertisement

Answer

The problem is in the viewclass of RecycleView (i.e. PostGrid). You set its heightas such it could not accomodate its children which is supposed to be the minimum height that will place all its children.

Now that’s exactly the attr. minimum_height does. With this being applied you also don’t need default_size: None, None (especially the height attr.)

With this and other modifications your .kv file should now look like,

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement