效果:
注意:使用圆角时,仅支持图片fitXY模式
gradle:
compile 'net.wujingchao.android.view:simple-tag-imageview:1.0.1'
maven:
<!-- you should configure jcenter repository-->
<dependency>
<groupId>net.wujingchao.android.view</groupId>
<artifactId>simple-tag-imageview</artifactId>
<version>1.0.1</version>
<type>aar</type>
</dependency>
xml:
<net.wujingchao.android.view.SimpleTagImageView
xmlns:simple="http://schemas.android.com/apk/res-auto"
android:id="@+id/stiv"
android:layout_margin="18dip"
android:layout_width="256dip"
android:layout_height="192dip"
android:src="@drawable/qwer"
simple:simple_tag_textSize="18sp"
simple:simple_corner_distance="30dp"
simple:simple_tag_text="AB"
simple:simple_tag_background_color="#af27CDC0"
simple:simple_tag_orientation="left_bottom"
simple:simple_tag_width="20dip"
simple:simple_tag_textColor="@android:color/white"
simple:simple_tag_enable="true"
simple:simple_tag_round_radius="20dp"/>