Only for Admin

Swipe down reload in Webview

Swipe down is been great to add in your own browser(Or an app that shows your Website). This will make your app wonderful and will make it look good.To start with, first, create a new project in sketchware. You can name it whatsoever you want but I will name it "Webview". See below if you have doubts.

Swipe down to refresh- 🤟Wow makes my browser wonderful

                 Swipe down is been great to add in your own browser(Or an app that shows your Website). This will make your app wonderful and will make it look good.
Swipe to Refresh Webview




Download the sketchware app from here.

To start with, first, create a new project in sketchware. You can name it whatsoever you want but I will name it "Webview". See below if you have doubts.


Add a Linear(H), the default id will be 'linear1'. If you want you can also change the id. But make sure you change it in the code provided or the compiler will show an error. Change the height of linear1 as 'match_parent'.
Now add a webview inside the linear 1. Let the id of the webview be webview1. Make sure you name the id as this, or compiler will show an error.


Now click the padding tab in linear1 options. Set the padding to be zero so that webview occupy full linear. See below.

Now click on the link below to get a text file which contains some codes which are used to get the swipe-down feature.
Swipe to Refresh.txt

Now copy the content from the swipetorefresh.txt.
Then open the project, open the events section and click on the onCreate activity.
This will show you a logical editor. Then click the fab button, and then on operators. Scroll down and you would find add source directly block. Drag it to the screen. Now paste the code you have copied in it by clicking on the blank white space after add source directly. If you are confused see below.


On onCreate event add the desired URL you want to go(With 'HTTP'). Here I use my blog to view. See below.


Now, go to the menu and open the library. Now turn on the AppCompat and design. See below if you are confused.

After that, click on to the event tab and click the '+' icon. Select onBackPressed, add. Click it and add an if-else block. Do as I do in the video.**Optional step. 



And at the final step save and run the app.⧭⧬


See the result.
Hope it is informative.



Links used in the post

Swipe to Refresh- Link for .txt file
here-Download sketchware




COMMENTS

Name

Aathish,1,Android,11,basic-programs,9,Free Domain,1,Python,13,Root,1,Scam app,1,Sketchware,11,syrusdhark,1,Useful,11,
ltr
item
Syrus Dark Tutorials: Swipe down reload in Webview
Swipe down reload in Webview
Swipe down is been great to add in your own browser(Or an app that shows your Website). This will make your app wonderful and will make it look good.To start with, first, create a new project in sketchware. You can name it whatsoever you want but I will name it "Webview". See below if you have doubts.
https://1.bp.blogspot.com/-75SCsWkJDUM/XUmwx5JF7cI/AAAAAAAAZ24/7H8-m6B4Gxo8fq3O6H5YNEmi8ppbidXNwCLcBGAs/s1600/Sketchware%2BTutorials.webp
https://1.bp.blogspot.com/-75SCsWkJDUM/XUmwx5JF7cI/AAAAAAAAZ24/7H8-m6B4Gxo8fq3O6H5YNEmi8ppbidXNwCLcBGAs/s72-c/Sketchware%2BTutorials.webp
Syrus Dark Tutorials
https://blog.syrusdark.website/2019/07/swipe-down-reload-in-webview.html
https://blog.syrusdark.website/
https://blog.syrusdark.website/
https://blog.syrusdark.website/2019/07/swipe-down-reload-in-webview.html
true
382615537509720948
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy

Ad Blocker Detected

Ads help us finance our site, please disable the ad blocker and help us provide you with exclusive content. Thank you for your support.