public class Guests_Adapter extends RecyclerView.Adapter<Guests_Adapter.MyViewHolder> {
private List<BookingData_GS> guests_List;
private Context context;
class MyViewHolder extends RecyclerView.ViewHolder {
EditText guestFullName;
private MyViewHolder(View view) {
super(view);
guestFullName = (EditText) view.findViewById(R.id.guestsName);
}
}
public Guests_Adapter(Context context, List<BookingData_GS> guests_List) {
this.context = context;
this.guests_List = guests_List;
}
@Override
public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View itemView = LayoutInflater.from(parent.getContext())
.inflate(R.layout.z_row_guests, parent, false);
return new MyViewHolder(itemView);
}
@Override
public void onBindViewHolder(MyViewHolder holder, int position) {
BookingData_GS guest_gs = guests_List.get(position);
// holder.guestFullName.getText().toString(); ???????
}
@Override
public int getItemCount() {
return guests_List.size();
}
}