johannilsson/android-pulltorefresh — Issue #45: Cannot Cast From ListView to PullToRefreshListView
Author: faint545
Created: 2012-01-01 18:34:11+00:00
State: open

I pulled the exact same sample code that you have and it seems as though using the following does not work...

((PullToRefreshListView) getListView()).setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh() {
// Do work to refresh the list here.
new GetDataTask().execute();
}
});

Is this a known issue already? Using findViewById() seems to be the only workaround.