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>

 

posted @ 2023-12-26 21:31  txwtech  阅读(30)  评论(0编辑  收藏  举报