Добавить
Уведомления

Swipe Down to Refresh in Sketchware

Hello friends in this video we have shown how to create a Swipe Down to Refresh in Sketchware. Hope you all will like the video. Do like the video. Also do subscribe our channel for more such videos. Hope you will learn something new from the video. Also if you get any issues in this then do bring it into our notice so that we can solve it. The code used can be copied from:- final android.support.v4.widget.SwipeRefreshLayout sr = new android.support.v4.widget.SwipeRefreshLayout(this); sr.setLayoutParams(new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT, android.widget.LinearLayout.LayoutParams.MATCH_PARENT)); linear1.addView(sr); final WebView wb = (WebView)findViewById(R.id.webview1); wb.getSettings().setJavaScriptEnabled(true); linear1.removeView(wb); linear1.post(new Runnable() { @Override public void run() { sr.addView(wb); } }); wb.setWebViewClient(new WebViewClient() { public void onPageFinished(WebView view, String url) { sr.setRefreshing(false); }}); sr.setOnRefreshListener( new android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { wb.reload(); } } ); #sketchware #scratch #android #app

Иконка канала Hacking Havoc
1 подписчик
12+
14 просмотров
Год назад
17 октября 2024 г.
12+
14 просмотров
Год назад
17 октября 2024 г.

Hello friends in this video we have shown how to create a Swipe Down to Refresh in Sketchware. Hope you all will like the video. Do like the video. Also do subscribe our channel for more such videos. Hope you will learn something new from the video. Also if you get any issues in this then do bring it into our notice so that we can solve it. The code used can be copied from:- final android.support.v4.widget.SwipeRefreshLayout sr = new android.support.v4.widget.SwipeRefreshLayout(this); sr.setLayoutParams(new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT, android.widget.LinearLayout.LayoutParams.MATCH_PARENT)); linear1.addView(sr); final WebView wb = (WebView)findViewById(R.id.webview1); wb.getSettings().setJavaScriptEnabled(true); linear1.removeView(wb); linear1.post(new Runnable() { @Override public void run() { sr.addView(wb); } }); wb.setWebViewClient(new WebViewClient() { public void onPageFinished(WebView view, String url) { sr.setRefreshing(false); }}); sr.setOnRefreshListener( new android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { wb.reload(); } } ); #sketchware #scratch #android #app

, чтобы оставлять комментарии