Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting android:background property to a color results in blank tags #31

Open
loudenvier opened this issue Nov 26, 2016 · 1 comment
Open

Comments

@loudenvier
Copy link

If you set the background color of the TagView the tags are not drawn properly and it shows completely blank. The tags are there, because the TagView is using the correct space, but they are just not drawn correctly.

Here is the XML:

<com.cunoraz.tagview.TagView
    xmlns:tagview="http://schemas.android.com/apk/res-auto"
    android:id="@+id/tagsDanceStyles"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    style="@style/ProfileEditPaddings"
    tagview:lineMargin="5dp"
    tagview:tagMargin="5dp"
    tagview:textPaddingLeft="8dp"
    tagview:textPaddingTop="5dp"
    tagview:textPaddingRight="8dp"
    tagview:textPaddingBottom="5dp" />
<com.cunoraz.tagview.TagView
    xmlns:tagview="http://schemas.android.com/apk/res-auto"
    android:id="@+id/tagsDanceStylesEdit"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    style="@style/ProfileEditPaddings"
    android:background="@color/red_500"
    tagview:lineMargin="5dp"
    tagview:tagMargin="5dp"
    tagview:textPaddingLeft="8dp"
    tagview:textPaddingTop="5dp"
    tagview:textPaddingRight="8dp"
    tagview:textPaddingBottom="5dp" />

Here is how I fill both Tag Views:

for (DanceStyle style : DanceStyles.all()) {
    Tag tag = new Tag(style.name);
    //tag.tagTextColor = getResources().getColor(R.color.editHeaderText);
    tag.layoutColor = getResources().getColor(style.resColor);
    tag.radius = 20f;
    danceStyles.addTag(tag);
    danceStylesEdit.addTag(tag);
}

And this is the result:

tagview-blank

You can see that despite both Tag Views being filled exactly the same way, the one with the background property set draws no tags... Maybe the tags are "bellow" the background...

@srujanb
Copy link

srujanb commented Jul 10, 2017

Even I'm facing many such issues with this library. I appreciate the efforts but not really well built.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants