안녕하세요..
아래와같이 ListView 안에 Row를 넣는 과정에 자꾸 오류가 납니다.
list.setAdapter(ca); 호출 시 GetView 가 호출 되어야 하는 것 아닌가요? ㅠㅠ
도와주세요~
public class TeamMemberDisplay extends Activity{
String receivedString;
ListView list;
int listingCnt;
String[] customerno;
String[] mobile;
String[] kname;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
Intent i = getIntent();
receivedString = i.getStringExtra("customerno");
Log.d("MKLog","Team Memeber Display Page start with customerno : " + receivedString);
setContentView(R.layout.teamdisplay);
list = (ListView)findViewById(R.id.lvCustomerList);
listingCnt = 1;
getIBCListAndDisplay(listingCnt);
CustomerAdapter ca = new CustomerAdapter(this,R.layout.teamdisplay_row, customerno);
list.setAdapter(ca);
}
public class CustomerAdapter extends ArrayAdapter{
Activity context;
public CustomerAdapter(Context context, int teamDisplayRowResourceId, Object[] list) {
// TODO Auto-generated constructor stub
super(context, teamDisplayRowResourceId,list);
this.context = (Activity) context;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
Log.d("MKLog", "setAdapter Called : " + position);
return super.getView(position, convertView, parent);
}
}
}