attrs_round.xml 3.02 KB
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- *公共属性* -->

    <!--全部圆角半径-->
    <attr name="radius" format="dimension|reference" />
    <!--针对各个角的半径-->
    <attr name="radius_top_left" format="dimension|reference" />
    <attr name="radius_top_right" format="dimension|reference" />
    <attr name="radius_bottom_left" format="dimension|reference" />
    <attr name="radius_bottom_right" format="dimension|reference" />

    <!--描边颜色/半径-->
    <attr name="stroke_color" format="color|reference" />
    <attr name="stroke_width" format="dimension|reference" />
    <attr name="mask_color" format="color|reference" />

    <!--  实体半径  -->
    <attr name="solid_color" format="color|reference" />

    <!-- 间隔 -->
    <attr name="spacing" format="dimension|reference" />

    <!-- 是否剪裁 RCLayout 的背景 -->
    <attr name="clip_background" format="boolean" />

    <!--  覆盖方向,true表示前面的view覆盖后面的view,false表示后面的view覆盖前面的view  -->
    <attr name="cover_direction" format="boolean" />
    <attr name="cover_ratio" format="float" />
    <attr name="child_width" format="dimension|reference" />
    <attr name="child_height" format="dimension|reference" />

    <declare-styleable name="PagerIndexPoint">
        <attr name="solid_color" />
        <attr name="radius" />
        <attr name="spacing" />
    </declare-styleable>

    <declare-styleable name="RoundRectAttrs">
        <attr name="radius" />
        <attr name="radius_top_left" />
        <attr name="radius_top_right" />
        <attr name="radius_bottom_left" />
        <attr name="radius_bottom_right" />
        <attr name="stroke_color" />
        <attr name="stroke_width" />
        <attr name="mask_color" />
        <attr name="clip_background" />
    </declare-styleable>

    <!--假体:用于提示-->
    <declare-styleable name="RoundRectFrameLayout">
        <attr name="radius" />
        <attr name="radius_top_left" />
        <attr name="radius_top_right" />
        <attr name="radius_bottom_left" />
        <attr name="radius_bottom_right" />
        <attr name="stroke_color" />
        <attr name="stroke_width" />
        <attr name="mask_color" />
        <attr name="clip_background" />
    </declare-styleable>

    <!--假体:用于提示-->
    <declare-styleable name="RoundRectImageView">
        <attr name="radius" />
        <attr name="radius_top_left" />
        <attr name="radius_top_right" />
        <attr name="radius_bottom_left" />
        <attr name="radius_bottom_right" />
        <attr name="stroke_color" />
        <attr name="stroke_width" />
        <attr name="mask_color" />
        <attr name="clip_background" />
    </declare-styleable>

    <declare-styleable name="ImageLayout">
        <attr name="child_width" />
        <attr name="child_height" />
        <attr name="cover_direction" />
        <attr name="cover_ratio" />
        <attr name="stroke_color" />
        <attr name="stroke_width" />
    </declare-styleable>
</resources>