找不到符号.setOnRefreshListener android webview

时间:2017-02-23 10:32:34

标签: android webview swiperefreshlayout

我正在尝试使用以下方法在我的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
    }
});

0 个答案:

没有答案