我正在尝试使用以下方法在我的webview上添加刷卡刷新但我无法通过错误,找不到符号setOnRefreshListener。我做错了什么?
SwipeRefreshLayout swipeLayout = (SwipeRefreshLayout)this.findViewById(R.id.swipeToRefresh);
swipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
@Override
public void onRefresh() {
// Insert annimation during refresh..
w1.reload(); // refreshes the WebView
}
});