1private Context context;
2
3@Override
4public FeedAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,int viewType) {
5 // create a new view
6 View v=LayoutInflater.from(parent.getContext()).inflate(R.layout.feedholder, parent, false);
7 // set the view's size, margins, paddings and layout parameters
8 ViewHolder vh = new ViewHolder(v);
9 // set the Context here
10 context = parent.getContext();
11 return vh;
12}
13