I wanted to implement Pull to Refresh feature in my android application, so I implemented this library: Android-PullToRefresh. However, I can't seem to set custom style to divide programmatically.
The code is simple:
list = (PullToRefreshListView) findViewById(R.id.list);
int[] colors = {0, 0xFF97CF4D, 0};
list.setDivider(new GradientDrawable(Orientation.RIGHT_LEFT, colors));
list.setDividerHeight(1);
However, it is throwing this error: The method setDivider(GradientDrawable) is undefined for the type PullToRefreshListView
and The method setDividerHeight(int) is undefined for the type PullToRefreshListView.
What am I doing wrong here?
Type mismatch: cannot convert from ListView to PullToRefreshListView
– Clytemnestra