when i create the custom view of each items of the list view, i get a null pointer exception and i dont know why, the layout id seems correct
import android.
Try changing the relevant code inside your Adapter class to the following
@Override
public View getView(int position, View convertView, ViewGroup parent) {
LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View itemView;
if (convertView == null) {
itemView = inflater.inflate(R.layout.item_view, parent, false);
} else {
itemView = convertView;
}
...
...
return itemView;
}