attrs.xml 4.61 KB
<?xml version="1.0" encoding="utf-8"?>
<resources>

    <attr name="app_primary_color" format="color"/> <!-- topbar -->
    <attr name="app_content_bg_color" format="color"/> <!-- content-->

    <!-- 申请进度的自定义view-->
    <declare-styleable name="AuditProgressView">
        <!--当前步骤是否完成 -->
        <attr name="apv_isCurrentComplete" format="boolean" />
        <!--下一个步骤是否完成 -->
        <attr name="apv_isNextComplete" format="boolean" />
        <!--是不是第一个步骤 -->
        <attr name="apv_isFirstStep" format="boolean" />
        <!--是不是最后一个步骤 -->
        <attr name="apv_isLastStep" format="boolean" />
        <!--共有几个步骤 -->
        <attr name="apv_stepCount" format="integer" />
        <!--步骤提示 -->
        <attr name="apv_text" format="string|reference" />
        <!--步骤提示2 -->
        <attr name="apv_text_2" format="string|reference" />
    </declare-styleable>

    <declare-styleable name="CircleIndicator">
        <attr name="ci_width" format="dimension"/>
        <attr name="ci_height" format="dimension"/>
        <attr name="ci_margin" format="dimension"/>
        <attr name="ci_animator" format="reference"/>
        <attr name="ci_animator_reverse" format="reference"/>
        <attr name="ci_drawable" format="reference"/>
        <attr name="ci_drawable_unselected" format="reference"/>

        <attr name="ci_orientation" format="enum">
            <!-- Defines an horizontal widget. -->
            <enum name="horizontal" value="0"/>
            <!-- Defines a vertical widget. -->
            <enum name="vertical" value="1"/>
        </attr>

        <attr name="ci_gravity">
            <!-- Push object to the top of its container, not changing its size. -->
            <flag name="top" value="0x30"/>
            <!-- Push object to the bottom of its container, not changing its size. -->
            <flag name="bottom" value="0x50"/>
            <!-- Push object to the left of its container, not changing its size. -->
            <flag name="left" value="0x03"/>
            <!-- Push object to the right of its container, not changing its size. -->
            <flag name="right" value="0x05"/>
            <!-- Place object in the vertical center of its container, not changing its size. -->
            <flag name="center_vertical" value="0x10"/>
            <!-- Grow the vertical size of the object if needed so it completely fills its container. -->
            <flag name="fill_vertical" value="0x70"/>
            <!-- Place object in the horizontal center of its container, not changing its size. -->
            <flag name="center_horizontal" value="0x01"/>
            <!-- Grow the horizontal size of the object if needed so it completely fills its container. -->
            <flag name="fill_horizontal" value="0x07"/>
            <!-- Place the object in the center of its container in both the vertical and horizontal axis, not changing its size. -->
            <flag name="center" value="0x11"/>
            <!-- Grow the horizontal and vertical size of the object if needed so it completely fills its container. -->
            <flag name="fill" value="0x77"/>
            <!-- Additional option that can be set to have the top and/or bottom edges of
            the child clipped to its container's bounds.
            The clip will be based on the vertical gravity: a top gravity will clip the bottom
            edge, a bottom gravity will clip the top edge, and neither will clip both edges. -->
            <flag name="clip_vertical" value="0x80"/>
            <!-- Additional option that can be set to have the left and/or right edges of
            the child clipped to its container's bounds.
            The clip will be based on the horizontal gravity: a left gravity will clip the right
            edge, a right gravity will clip the left edge, and neither will clip both edges. -->
            <flag name="clip_horizontal" value="0x08"/>
            <!-- Push object to the beginning of its container, not changing its size. -->
            <flag name="start" value="0x00800003"/>
            <!-- Push object to the end of its container, not changing its size. -->
            <flag name="end" value="0x00800005"/>
        </attr>

    </declare-styleable>

    <!--滑动开关的设置属性-->
    <declare-styleable name="switch_button">
        <attr name="defaultColor" format="color"/>
        <attr name="selectColor" format="color"/>
        <attr name="buttonColor" format="color"/>
        <attr name="isSelected" format="boolean"/>
        <attr name="clickAutoMode" format="boolean"/>
    </declare-styleable>


</resources>