Enable Webview Zoom Controls Using Kotlin In Android

In this article, we are going to learn about how to enable Webview zoom controls using kotlin language in android. for java language read my previous article. follow our tutorial to enable zoom in webview in android using android studio.

enable Webview zoom controls using kotlin language in android

enable zoom in webview

quick look into the below code to enable zoom in webview using android studio.

First create new android studio project for that follow the below step. if you already create then ignore the below steps.

  • Open android studio and click on file -> New -> New Project .
  • Now write project name and select kotlin and click next button.
  • Then select empty activity and click finish button. that’s it.

Then open the AndroidMenifest.xml file and add uses permission for internet to get internet access.

how to enable Webview zoom controls using kotlin language

 Now Open res -> layout -> activity_main.xml and then add following code :

activity_main.xml

Then Open src -> package -> MainActivity.kt and then add following code :

MainActivity.kt

 Let’s try to run your application. you will get output as shown below.

enable Webview zoom controls using kotlin language in android
enable Webview zoom controls using kotlin language in android

Leave a Reply

Your email address will not be published. Required fields are marked *