Unable to change tag container background, tag border, etc
royherma opened this issue · comments
Roy Hermann commented
Here's my code in xml:
<co.lujun.androidtagview.TagContainerLayout
android:id="@+id/lip_tag_container_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/lip_image_view"
android:layout_marginStart="6dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="16dp"
android:background="@null"
android:textSize="4sp"
app:container_background_color="@null"
app:container_border_width="0.0dp"
app:tag_border_width="0.0dp"
app:tag_corner_radius="12dp"
app:tag_horizontal_padding="4dp"
app:tag_text_size="10.0sp"
app:tag_theme="none"
app:tag_vertical_padding="4dp" />
and since this didn't work, I try to modify it in code:
binding.lipTagContainerLayout.removeAllTags();
binding.lipTagContainerLayout.setTags(place.tagStrings(context), place.tagColors(context));
binding.lipTagContainerLayout.setTagBackgroundColor(Color.TRANSPARENT);
binding.lipTagContainerLayout.setTheme(ColorFactory.NONE);
However this is a sample result:
As you can see, there is a slight red background color for the container view...
How do i remove it completely?? (aka make it transparent / clear )
Roy Hermann commented
The trick was first of all setting the attributes and then only adding the tags!