@Override
public View getView(final int position, View convertView, ViewGroup parent) {
// TODO Auto-generated method stub
if(convertView == null){
LayoutInflater inflater=(LayoutInflater)c.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
convertView=inflater.inflate(R.layout.program_list,null);
}
// GET VIEWS
TextView nameTxt=(TextView) convertView.findViewById(R.id.nametxt);
TextView landTxt=(TextView) convertView.findViewById(R.id.landtxt);
TextView groesseTxt=(TextView) convertView.findViewById(R.id.groessetxt);
TextView gewichtTxt=(TextView) convertView.findViewById(R.id.gewichttxt);
ImageView img =(ImageView) convertView.findViewById(R.id.imageView1);
//SET DATA
nameTxt.setText(names[position]);
landTxt.setText(land[position]);
groesseTxt.setText(groesse[position]);
gewichtTxt.setText(gewicht[position]);
img.setImageResource(images[position]);
return convertView;
}
I can't start my program of the NullPointerException
I want to create a custom listview, with a onClick to a new Activity...