SWIPE REFRESH FOR WEBVIEW IN SKETCHWARE

To implement SwipeRefreshLayout in this app to reload the WebView, follow the steps given below.

1. Swith on AppCompat and design.

2. Create a more block extra and put codes to declare a SwipeRefreshLayout srl.

}
androidx.swiperefreshlayout.widget.SwipeRefreshLayout srl;
{

3. In onCreate event, before loading url in WebView;
getUrl in WebView using blocks.

4. Add WebView onPageFinished event. Here, to stop the SwipeRefreshLayout, use setRefreshing(false).

srl.setRefreshing(false); 

Leave a comment