package pl.komunikator.komunikator;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import java.util.List;

import pl.komunikator.komunikator.entity.User;

/**
 * Created by adrian on 19.04.2017.
 */

public class SearchedUsersAdapter extends RecyclerView.Adapter<SearchedUsersAdapter.MyViewHolder> {

    private List<User> userList;

    public class MyViewHolder extends RecyclerView.ViewHolder {
        public TextView name, email;
        public ImageView photo;

        public MyViewHolder(View view) {
            super(view);

            name = (TextView) view.findViewById(R.id.contactName);
            email = (TextView) view.findViewById(R.id.contactEmail);
            photo = (ImageView) view.findViewById(R.id.contactImageView);
        }
    }

    public SearchedUsersAdapter(List<User> userList) {
        this.userList = userList;
    }

    @Override
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        return null;
    }

    @Override
    public void onBindViewHolder(MyViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 0;
    }

}

@@ -73,24 +73,60 @@
 cyclerView;%0A
+import android.view.LayoutInflater;%0A
 import andro
@@ -1115,112 +1115,409 @@
     
-return null;%0A    %7D%0A%0A    @Override%0A    public void onBindViewHolder(MyViewHolder holder, int position) %7B%0A
+View itemView = LayoutInflater.from(parent.getContext())%0A                .inflate(R.layout.item_searched_user, parent, false);%0A%0A        return new MyViewHolder(itemView);%0A    %7D%0A%0A    @Override%0A    public void onBindViewHolder(MyViewHolder holder, int position) %7B%0A        User user = userList.get(position);%0A        holder.name.setText(user.getUsername());%0A        holder.email.setText(user.getEmail());
 %0A   
@@ -1581,17 +1581,31 @@
  return 
-0
+userList.size()
 ;%0A    %7D%0A

Implement the rest of the methods