Skip to content

Commit

Permalink
Merge pull request #10 from AAkira/fix/inlated-view
Browse files Browse the repository at this point in the history
Fix inflated view using parent view.
  • Loading branch information
satorufujiwara authored Aug 2, 2017
2 parents cb90a25 + cc83cdc commit a7dce21
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down

0 comments on commit a7dce21

Please sign in to comment.