(ESP-IDF)LVGL XML 布局
布局
本案例实现了 flex 布局与坐标布局

<screen>
<styles>
<style name="style_main" bg_color="0x00688a" />
</styles>
<view
flex_flow="column"
height="100%"
width="100%"
style_flex_main_place="start"
style_flex_track_place="center"
style_flex_cross_place="center"
style_pad_row="0"
>
<style name="style_main" />
<lv_obj
width="100%"
height="80%"
flex_flow="row"
style_flex_track_place="center"
style_flex_cross_place="center"
style_pad_all="0"
style_pad_column="0"
>
<lv_obj
width="50%"
height="100%"
style_radius="0"
flex_flow="column"
style_flex_main_place="center"
style_flex_track_place="center"
style_flex_cross_place="center"
>
<button_i />
<button_i />
<button_i />
</lv_obj>
<lv_obj
width="50%"
height="100%"
style_radius="0"
>
<button_i x="0" y="20"/>
<button_i x="0" y="80"/>
<button_i x="0" y="140"/>
</lv_obj>
</lv_obj>
<lv_obj
width="100%"
height="20%"
flex_flow="row"
style_flex_main_place="center"
style_flex_track_place="center"
style_flex_cross_place="center"
>
<lv_label text="Hello world" style_text_font="font_medium" style_text_color="0x000" />
</lv_obj>
</view>
</screen>
License:
CC BY 4.0