attached view to parent when calling Inflater

Fixes #8332

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2021-05-02 16:06:36 +02:00
parent 9e32fc0aa5
commit 1147440f3e
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B

View file

@ -149,11 +149,11 @@ public class ActivityListAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
if (viewType == ACTIVITY_TYPE) { if (viewType == ACTIVITY_TYPE) {
return new ActivityViewHolder( return new ActivityViewHolder(
ActivityListItemBinding.inflate(LayoutInflater.from(parent.getContext())) ActivityListItemBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)
); );
} else { } else {
return new ActivityViewHeaderHolder( return new ActivityViewHeaderHolder(
ActivityListItemHeaderBinding.inflate(LayoutInflater.from(parent.getContext())) ActivityListItemHeaderBinding.inflate(LayoutInflater.from(parent.getContext()), parent, false)
); );
} }
} }