HarmonyOS鸿蒙组件状态
btn_state_container.xml
p115
<?xml version="1.0" encoding="utf-8"?> <state-container xmlns:ohos="http://schemas.huawei.com/res/ohos"> <item ohos:state ="component_state_pressed" ohos:element ="#FF4286EE"/><!--按下切换到该状态 --> <item ohos:state ="component_state_hovered" ohos:element ="#FF76EE42"/><!--触摸设备不会切换到该状态 --> <item ohos:state ="component_state_empty" ohos:element ="#FF65D9EE"/><!--默认状态 --> <item ohos:state ="component_state_selected" ohos:element ="#FFE7F14A"/><!--默认状态 --> </state-container>
欢迎讨论,相互学习。
cdtxw@foxmail.com