How to manually trigger pullToRefresh in RadListView

android

#1

How to manually trigger pullToRefresh in RadListView?

After going through API, I did not found any document for manually trigger (by calling function) pullToRefresh, which can be used to initial load data for user.


#2

That feature is very custom and not directly supported yet. But you can hack it in Android like,

const refreshLayout = radListView._pullToRefreshBehavior.swipeRefresh();
            refreshLayout.setRefreshing(true);
               // Once you are done with updates, hide it
            setTimeout(() => {
                refreshLayout.setRefreshing(false);
            }, 1000);

FYI, This won’t trigger the pullToRefreshInitiated event as we are overriding the default behavior.