帶標籤的imageview

效果:



注意:使用圓角時,僅支持圖片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"/>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章