2023年6月

lvgl doc flex

lv_obj_set_layout(obj, LV_LAYOUT_FLEX)

The possible values for flex_flow are:

LV_FLEX_FLOW_ROW: Place the children in a row without wrapping
不换行的ROW

LV_FLEX_FLOW_COLUMN: Place the children in a column without wrapping

LV_FLEX_FLOW_ROW_WRAP: Place the children in a row with wrapping

LV_FLEX_FLOW_COLUMN_WRAP: Place the children in a column with wrapping

LV_FLEX_FLOW_ROW_REVERSE: Place the children in a row without wrapping but in reversed order

LV_FLEX_FLOW_COLUMN_REVERSE: Place the children in a column without wrapping but in reversed order

LV_FLEX_FLOW_ROW_WRAP_REVERSE: Place the children in a row with wrapping but in reversed order

LV_FLEX_FLOW_COLUMN_WRAP_REVERSE: Place the children in a column with wrapping but in reversed order



The possible values are:

LV_FLEX_ALIGN_START: means left on a horizontally and top vertically. (default)

LV_FLEX_ALIGN_END: means right on a horizontally and bottom vertically

LV_FLEX_ALIGN_CENTER: simply center

LV_FLEX_ALIGN_SPACE_EVENLY: items are distributed so that the spacing between any two items (and the space to the edges) is equal. Does not apply to track_cross_place.

LV_FLEX_ALIGN_SPACE_AROUND: items are evenly distributed in the track with equal space around them. Note that visually the spaces aren't equal, since all the items have equal space on both sides. The first item will have one unit of space against the container edge, but two units of space between the next item because that next item has its own spacing that applies. Not applies to track_cross_place.

LV_FLEX_ALIGN_SPACE_BETWEEN: items are evenly distributed in the track: first item is on the start line, last item on the end line. Not applies to track_cross_place.