This was a hell of a ride (two sleepless nights). Thanks for all your help, somehow I fixed it! :)
Mostly thanks to this question Null pointer exception in getView() of custom Adapter I made new getView function:
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = new ViewHolder();
View vi = convertView;
if (vi == null) {
LayoutInflater inflater = ((Activity)activity).getLayoutInflater();
vi = inflater.inflate(R.layout.list_row, null);
holder.title = (TextView) vi.findViewById(R.id.title);
holder.subtitle = (TextView) vi.findViewById(R.id.subtitle);
vi.setTag(holder);
} else {
holder = (ViewHolder) vi.getTag();
}
HashMap<String, String> post;
post = data.get(position);
holder.title.setText(post.get("title"));
holder.subtitle.setText(post.get("subtitle"));
return vi;
}
holder is just a simple class:
private class ViewHolder {
public TextView title;
public TextView subtitle;
}
I've done that and I also copied xml drawable files in all drawable folders (merged all). So one of this actions fixed it, but I'm not quite sure what..