PullToRefreshListViewis not ListView, therefore, this error. You must access the ListViewinside PullToRefreshListViewand call methods on it setDivider*.
list = (PullToRefreshListView) findViewById(R.id.list);
int[] colors = {0, 0xFF97CF4D, 0};
ListView inner = list.getRefreshableView();
inner.setDivider(new GradientDrawable(Orientation.RIGHT_LEFT, colors));
inner.setDividerHeight(1);
XML ,
:
<com.handmark.pulltorefresh.library.PullToRefreshListView
android:divider="@drawable/fancy_gradient"
android:dividerHeight="@dimen/divider_height"...