In this Kotlin android development tutorial we will be creating an interface for the DialogFragment.
Which will send the webpage title to the calling activity using an interface.
Once the main activity has the title it will find the matching title in the WebBackForwardList using a Kotlin range. Upon completion of finding the match the WebView’s goBackOrForward function will be called with the correct offset. Which will result in the history page being loaded.
There is an early release of the following tutorial here https://goo.gl/t4fNzm Note you will need to signup to the free membership here https://goo.gl/6tDV38
1 - Kotlin Webview • Kotlin android development tutorial -...
2 - Kotlin Toolbar • Kotlin android development tutorial -...
3 - Kotlin Browser • Kotlin android development tutorial -...
4 - Kotlin ArrrayList • Kotlin android development tutorial -...
5 - Kotling DialogFragment • Kotlin android development tutorial -...
6 - Kotlin Interface • Kotlin android development tutorial -...
To get access to the early release of tutorials, code descriptions, code and github bonus videos signup here https://goo.gl/6tDV38
www.mobapptuts.com series https://goo.gl/RYrTfu
youtube playlist: • kotlin webview tutorials
In this tutorial we will cover:
Creating a Kotlin Interface
Creating a lateinit variable to represent the interface
Implementing the DialogFragment onAttach() to initialize the variable
Calling the interface from within the on click listener
Implementing the Kotlin Interface in the main activity
Using a range to find the matching web title
Loading the correct web page from the history list
Kotlin API's covered:
WebView.copyBackForwardList()
Range: for (i in 0 until webHistory.size)
Explicit cast: webHistory = context as WebHistory
For Kotlin & Android training and support you can schedule a video call from here https://app.acuityscheduling.com/sche...
Disclaimer - The only support provided on this channel which includes questions, will be submission of suspect bugs that are reproducible on android Nexus hardware on the github code base.
For much more information checkout
Website - https://www.mobapptuts.com
Codementor - https://www.codementor.io/mobapptuts
Twitter - / mobapptuts
Facebook - / nigeapptuts
Google+ - https://plus.google.com/b/11588464208...
Pinterest - / mobapptuts