Using Chris Banes' PullToRefresh library, the getView() method of my custom adapter is not being called. This code works fine without using his library and getView() is called. I've been looking into this for a couple days now and cannot figure out what's wrong. Any feedback would be greatly appreciated!
MyActivity.java
MyAdapter adapter = new MyAdapter(this, data);
// the following toast displays the correct count
Toast.makeText("MyActivity", adapter.getCount(), Toast.LENGTH_SHORT).show();
myListView.setAdapter(adapter);
MyAdapter.java
public class MyAdapter extends ArrayAdapter<Object> {
private ArrayList<Object> data;
private LayoutInflater vi;
private Context context;
public MyAdapter(Context context, ArrayList<Object> data) {
super(context, 0);
this.context = context;
this.data = data;
this.vi = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
static class ViewHolder {
...
}
@Override
public int getCount() {
return data.size();
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
// not getting called
...
}
}