Skip to content

[FEATURE] Arrange and Align helper methods #7

@g-mark

Description

@g-mark

Seems that a common task is for a bunch of child views to horizontally fill their parent, with possibly different insets. It would be interesting to explore this kind of convenience:

.arrangeViews(.fillX, view1 - 40, view2 - 40, view3 - 15, view4 - 32)
  • options could be: centerX, fillX, leftAlign, rightAlign, plus same for vertical
  • maybe have a param for an at: offset, like (.leftAlign, at: leftEdge + 20, ...)

Or, something like:

   align(.top/.left/.right/.bottom, views: Anchorable...)
   
   distribute(.horizontally/.vertically, views: Anchorable...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions