Files
lvgl/examples/others/xml/view.xml
T
2025-06-17 11:43:50 +02:00

39 lines
1.3 KiB
XML

<component>
<consts>
<color name="light_blue" value="0xbbbbff"/>
<color name="dark_blue" value="0x000080"/>
</consts>
<styles>
<style name="btn_style" bg_color="#dark_blue" bg_opa="150"/>
<style name="btn_pr_style" bg_opa="255"/>
<style name="red_border" border_width="2" border_side="full" border_color="0xff0000"></style>
</styles>
<subjects>
<int name="subject1" value="10"/>
</subjects>
<view extends="lv_obj" flex_flow="column" name="main" width="280" height="content" style_bg_color="#light_blue">
<lv_label bind_text="subject1" styles="btn_style:disabled red_border:checked">
<bind_flag_if_gt subject="subject1" flag="hidden" ref_value="60"/>
<bind_state_if_lt subject="subject1" state="checked" ref_value="40"/>
<bind_state_if_lt subject="subject1" state="disabled" ref_value="20"/>
<style name="btn_style" selector="disabled"/>
<style name="red_border" selector="knob checked"/>
</lv_label>
<lv_slider bind_value="subject1" />
<my_card title="Card 1" name="card1"
y="100"
styles="red_border"
btn_rel_style="btn_style"
btn_pr_style="btn_pr_style"/>
<my_card y="185"
bg_color="0xffaaaa"
action="Apply"
btn_rel_style="btn_style"
btn_pr_style="btn_pr_style"/>
</view>
</component>