class CustomerAdapter extends BaseAdapter{
Context maincon;
LayoutInflater Inflater;
ArrayList<Customer> vSource;
int tlayout;
CustomerAdapter(Context context, int targetLayout, ArrayList<Customer> sourceArr)
{
Log.i("Gilrs getneration", "서현" );
maincon = context;
Inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
vSource = sourceArr;
tlayout = targetLayout;
}
@Override
public int getCount() {
// TODO Auto-generated method stub
return vSource.size(); }
@Override
public Object getItem(int position) {
// TODO Auto-generated method stub
return vSource.get(position).cusName;
}
@Override
public long getItemId(int position) {
// TODO Auto-generated method stub
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
Log.i("Gilrs getneration", "태연" );
final int pos = position;
if(convertView == null)
{
convertView = Inflater.inflate(tlayout,parent, false);
Log.i("Gilrs getneration", "윤아" );
}
TextView txt = (TextView)convertView.findViewById(R.id.listcon);
txt.setText(vSource.get(position).cusName);
convertView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
}
});
return convertView;
}
댓글 없음:
댓글 쓰기