package com.example.liste_custom;

import java.text.SimpleDateFormat;
import java.util.ArrayList;

import com.example.menu.R;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;

public class IndividuListViewAdapter extends ArrayAdapter<Individu>{
	
	private int viewListItemId;
	
	public IndividuListViewAdapter(Context context,  int textViewResourceId,
			ArrayList<Individu> objects) {	
		super(context,  textViewResourceId, objects);
		// TODO Auto-generated constructor stub
		viewListItemId=textViewResourceId;
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
	// Create and inflate the View to display
	if (convertView == null) {
		// Inflate a new view if this is not an update.
		String inflater = Context.LAYOUT_INFLATER_SERVICE;
		LayoutInflater li;
		li = (LayoutInflater)getContext().getSystemService(inflater);
		convertView=li.inflate(viewListItemId, parent, false);
	} 

	// Otherwise we’ll update the existing View
	Individu record=getItem(position);
	if(record!=null){
	
		// COMPLETE CODE HERE
	
	}
	return (convertView); // renvoie la vue modifiée
	}

}
