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)
Opened this issue · 4 comments
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
Same issue
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.
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();
Same issue