How to make a website html source code viewer app in sketchware
Hi there, today in this sketchware tutorial I will show you how you can make an app to view source code of any website. You can publish this kind of apps in Google play store. You can see my app in play store using this link. I have made this app using sketchware. This app contains some additional features like saving the html source code in a html format and showing a preview of the website and many more. Todays tutorial is going to be simple and short. But I promise, if you want to know how to add these additional features in your app. Then just comments below and let me know.
Follow these simple steps to make your website’s html source code viewer app using sketchware .
Step no. 1 : create the layout
The basic layout needs only a webView, an editText and a button. EditText is needed to take the web address from the user. The button will act as a ‘go’ button and in the webView we will load the html source code. Please note I prefer to put the webView inside a scroll(V). This further simplifies the scrolling process.
Carefully enable single line for the edit text. Otherwise for a long url the edittext may expand so that it will cover the sourcecode.
Here is how my ui is looking like. You can make any changes to look your UI better.
Step No. 2 : setup the on button clicked event.
In your on button clicked event place blocks as shown in below image.
In order to hide the keyboard I have disabled and then enabled the edittext. Remember I can also used to load the link over http:// but this will show you cleartext not permitted error. Above android 8 you need to load any url over https:// in order to avoid the error in sketchware.
The url structure should look like this
Setup On back pressed event
you can setup blocks like this or you can setup double tap to exit app feature like this tutorial.
And that’s all. Run your app and see the magic. So simple right. Please comment your views to motivate me. So that I can make so much tutorial tike this
Thanks for reading.