Привет, у меня есть пользовательское listview со следующим фрагментом.
Проблема приложение получить разбился, когда я запускаю код Вот мой кодКак удалить NullPointerException в этом коде
class MyAdupter extends ArrayAdapter<String>{
Context context;
String[] title ;
String[] description;
int[] images;
public MyAdupter(Context context, String[] title, String[] description, int[] images) {
super(context, R.layout.my_simple_row,title);
this.context = context;
this.title = title;
this.description = description;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Layoutlnflater inflater = (Layoutlnflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View row = inflater.inflate(R.layout.my_simple_row, parent, false);
ImageView imageView = (ImageView) row.findViewById (R.id.imageViewl);
TextView textTitle = (TextView) row.findViewById (R.id.textViewl);
TextView textDescription = (TextView) row.findViewById(R.id.textView2);
imageView.setImageResource(images[position]);
textTitle.setText(title[position]);
textDescription.setText(description[position]);
return row;
}
}
logacat пожалуйста, а также показать код – justDroid
Сообщение LogCat .modify Ваш вопрос –