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

Animations #4

Open
waj0 opened this issue Nov 29, 2015 · 1 comment
Open

Animations #4

waj0 opened this issue Nov 29, 2015 · 1 comment

Comments

@waj0
Copy link

waj0 commented Nov 29, 2015

Nice work, I will definitely use this lib.

Did you consider animating deletion / addition of single chip? I tried using animateLayoutChanges in xml, but it doesn't really work as expected.

@Plumillon
Copy link
Owner

This is a nice suggestion, I think this isn't working because of the way ChipView is rendering his content :

    public void refresh() {
        if (mAdapter != null) {
            removeAllViews();

            for (int i = 0; i < mAdapter.count(); i++) {
                View view = mAdapter.getView(this, i);

                if (view != null) {
                    if (mListener != null) {
                        view.setClickable(true);
                        view.setFocusable(true);
                    }

                    addView(view);
                }
            }

            invalidate();
        }
    }

For each change (adding or removing), the ChipView is refreshing all his content
I'll see what I can do

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