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

java.lang.IllegalStateException: ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot) #110

Open
Prat-JD opened this issue Jul 5, 2018 · 4 comments

Comments

@Prat-JD
Copy link

Prat-JD commented Jul 5, 2018

at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6687) at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5869) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752) at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748) at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.layoutDisappearingViews(ChipsLayoutManager.java:767) at com.beloo.widget.chipslayoutmanager.ChipsLayoutManager.onLayoutChildren(ChipsLayoutManager.java:731) at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812) at android.support.v7.widget.RecyclerView.onMeasure(RecyclerView.java:3225) at android.view.View.measure(View.java:19857) at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516) at com.pchmn.materialchips.views.ScrollViewMaxHeight.onMeasure(ScrollViewMaxHeight.java:47) at android.view.View.measure(View.java:19857) at android.support.v4.widget.NestedScrollView.measureChildWithMargins(NestedScrollView.java:1450) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.support.v4.widget.NestedScrollView.onMeasure(NestedScrollView.java:516) at com.pchmn.materialchips.views.ScrollViewMaxHeight.onMeasure(ScrollViewMaxHeight.java:47) at android.view.View.measure(View.java:19857) at android.widget.LinearLayout.measureHorizontal(LinearLayout.java:1098) at android.widget.LinearLayout.onMeasure(LinearLayout.java:642) at android.view.View.measure(View.java:19857) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19857) at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:1293) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.widget.ScrollView.onMeasure(ScrollView.java:340) at android.view.View.measure(View.java:19857) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19857) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:19857) at android.widget.LinearLayout.measureVertical(LinearLayout.java:911) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19857) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141) at android.view.View.measure(View.java:19857) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464) at android.widget.LinearLayout.measureVertical(LinearLayout.java:758) at android.widget.LinearLayout.onMeasure(LinearLayout.java:640) at android.view.View.measure(View.java:19857) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6083) at android.widget.FrameLayout.onMeasure(FrameLayout.jav

@dudhatparesh
Copy link

Same issue

@ruideraj
Copy link

ruideraj commented Aug 16, 2018

Seems to happen when I try to add more than one Chip at about the same time, e.g. when I click on two entries at the same time on a list that both add a Chip to the ChipsInput. Doesn't seem to happen at all when I'm adding/removing them one at a time, even if I'm tapping fairly quickly.

@frapeti
Copy link

frapeti commented Sep 27, 2018

same issue, so frustrating we can't even make all chips selected by default -.-

here is how I solved it in a nasty way:

new CountDownTimer(10000, 10) {
                 int index = 0;

                 @Override
                 public void onTick(long millisUntilFinished) {
                     if (index < array.size()) {
                         chips_input.addChip(array.get(index));
                         index++;
                     } else {
                         cancel();
                     }
                 }

                 @Override
                 public void onFinish() {

                 }
             }.start();

@nawaminp
Copy link

Same issue

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

5 participants