kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove view from parent before trying to insert into a new container.
rodzic
b1d1b7e31e
commit
b070e6962f
|
@ -747,6 +747,7 @@ public class ConversationAdapter
|
|||
unbind();
|
||||
|
||||
if (view != null) {
|
||||
removeViewFromParent(view);
|
||||
container.addView(view);
|
||||
}
|
||||
}
|
||||
|
@ -754,6 +755,12 @@ public class ConversationAdapter
|
|||
void unbind() {
|
||||
container.removeAllViews();
|
||||
}
|
||||
|
||||
private void removeViewFromParent(@NonNull View view) {
|
||||
if (view.getParent() != null) {
|
||||
((ViewGroup) view.getParent()).removeView(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class PlaceholderViewHolder extends RecyclerView.ViewHolder {
|
||||
|
|
Ładowanie…
Reference in New Issue