mcharmas / android-tagview

Simple android view to display list of colorful tags efficiently.
Apache License 2.0
175 stars 32 forks source link

Visibility issues #5

Open SwiftKayAndroid opened 8 years ago

SwiftKayAndroid commented 8 years ago

Change code to this in order to handle resetting tags after view was initialized but setTags originally contained an empty list

public void setTags(List<? extends Tag> tags, String separator) {
    if (tags.isEmpty()) {
        this.setVisibility(View.GONE);
        return;
    } else {

//If you initialized this originally with an empty list the above code made it GONE //then if you try to set again it doesn't become visible without adding this snippet. this.setVisibility(View.VISIBLE); }

vhacker5192 commented 6 years ago

Just Add this to your Activity manifest file android:configChanges="orientation|screenSize|keyboardHidden"