whilu / AndroidTagView

A TagView library for Android. Customize your own & Drag effect.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set Tag Background Resource not working in API 21

cuongtora1996 opened this issue · comments

I have some function with my cross design.
app:container_background_color="@color/transparent" app:container_border_color="@color/transparent" app:tag_border_color="@color/colorPrimary" app:tag_background_color="@color/transparent" app:tag_text_color="@color/colorPrimary" app:tag_border_width="0.5dp" app:tag_cross_area_padding="12dp" app:tag_enable_cross="true" app:tag_cross_color="@color/white" app:tag_background="@drawable/tag_view" app:tag_theme="none"
it will make the cross have the circle background border.
In <API 23, the drawable android gravity not working then I remove the tag back ground like this.

if(android.os.Build.VERSION.SDK_INT<23){ this.tagListLayout.tagBackgroundResource = R.drawable.background_tag_view this.tagListLayout.crossColor = R.color.black_brown_69 }
The above code work on API 22 but not in 21