BaseAdapter
显示数据时出现空指针异常CustomListview
public View getView(final int position, View convertView, ViewGroup parent){
// TODO Auto-generated method stub
ViewHolder holder = null;
LayoutInflater layout = getActivity().getLayoutInflater();
convertView = layout.inflate(R.layout.player, null);
View vi = convertView;
if (vi == null) {
holder = new ViewHolder();
holder.tProduct = (TextView) vi.findViewById(R.id.product);
holder.tTitle = (TextView) vi.findViewById(R.id.title);
convertView.setTag(holder);
} else {
holder = (ViewHolder) vi.getTag();
}
holder.tProduct.setText(description.get(position));
holder.tTitle.setText(title.get(position));
return vi;
}