From cc83cdc16cf5e7ba911d5f1735b3a48c7ed83644 Mon Sep 17 00:00:00 2001 From: "A.Akira" Date: Wed, 26 Jul 2017 13:55:57 +0900 Subject: [PATCH] Fix inflated view using parent view. --- .../java/jp/satorufujiwara/binder/recycler/RecyclerBinder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/binder/src/main/java/jp/satorufujiwara/binder/recycler/RecyclerBinder.java b/binder/src/main/java/jp/satorufujiwara/binder/recycler/RecyclerBinder.java index 56f4ed0..f87ce80 100644 --- a/binder/src/main/java/jp/satorufujiwara/binder/recycler/RecyclerBinder.java +++ b/binder/src/main/java/jp/satorufujiwara/binder/recycler/RecyclerBinder.java @@ -4,6 +4,7 @@ import android.content.Context; import android.support.annotation.LayoutRes; import android.support.v7.widget.RecyclerView; +import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -28,7 +29,7 @@ protected RecyclerBinder(final Context context, final V viewType) { @Override public final RecyclerView.ViewHolder onCreateViewHolder(final ViewGroup parent) { - return onCreateViewHolder(View.inflate(mContext, layoutResId(), null)); + return onCreateViewHolder(LayoutInflater.from(mContext).inflate(layoutResId(), parent, false)); } @Override