JavaNoober / BackgroundLibrary

A framework for directly generating shape through Tags, no need to write shape.xml again(通过标签直接生成shape,无需再写shape.xml)
Apache License 2.0
3.86k stars 469 forks source link

unPressed_drawable设为全透明时,stroke无效,不显示边框 #51

Closed liu-xinhui closed 5 years ago

liu-xinhui commented 5 years ago

如题

JavaNoober commented 5 years ago

你的xml内容是什么,发一下呢

liu-xinhui commented 5 years ago

@JavaNoober

<TextView
        android:id="@+id/cobbAngle"
        android:layout_width="180dp"
        android:layout_height="36dp"
        android:layout_marginTop="15dp"
        android:gravity="center"
        android:text="COBB ANGLE"
        android:textColor="@color/black"
        android:textSize="18dp"
        android:textStyle="bold"
        app:bl_corners_radius="4dp"
        app:bl_pressed_drawable="@color/grayC"
        app:bl_stroke_color="@color/black"
        app:bl_stroke_width="1dp"
        app:bl_unPressed_drawable="#01FFFFFF" />

上面的代码是正常的,但是app:bl_unPressed_drawable="#01FFFFFF"改为全透明app:bl_unPressed_drawable="#00FFFFFF",边框就会不显示

JavaNoober commented 5 years ago

我试了一下,发现正常啊