Back to Browse

Kotlin android development tutorial - Creating a Dialog Interface

2.3K views
Sep 1, 2017
13:40

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 https://youtu.be/FjNkbpmmsEI 2 - Kotlin Toolbar https://youtu.be/bEIxL6EOKLQ 3 - Kotlin Browser https://youtu.be/oJcsiFsSCVs 4 - Kotlin ArrrayList https://youtu.be/phcQfdp-5W4 5 - Kotling DialogFragment https://youtu.be/sQDm7J5RXrM 6 - Kotlin Interface https://youtu.be/P564Me4AA3k 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: https://www.youtube.com/playlist?list=PL9jCwTXYWjDLm9_vlldkbPuqDn3r7UMRx 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/schedule.php?owner=14193450 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 - https://twitter.com/MobAppTuts Facebook - https://www.facebook.com/nigeapptuts Google+ - https://plus.google.com/b/115884642086760882044 Pinterest - https://www.pinterest.com/mobapptuts/

Download

0 formats

No download links available.

Kotlin android development tutorial - Creating a Dialog Interface | NatokHD