How To Code a WebView, Android Tutorial
Prev Page Coding Shape Divider
This Tutorial App Coding A WebView

Next Tutorial App Coding a Screen Splash


If you are just arriving at this page; and you are not familiar with with creating Android Apps, we suggest you begin with our tutorials: Coding Android App Pages and How To Create a Simple App in Android

From there follow along with each tutorial lesson.


We are using AIDE(the SDK coding environment for android devices), to create these tutorial apps on our tablet with android version 5; using the Java XML programming language.

We are using the AIDE coding editor to code our pages; and then to Create - Build, RUN and INSTALL them on our android device.
AIDE has a free and paid version. As of this year, the paid version of AIDE is about $20 canadian. Once you create your apps code pages, you need to RUN the app to INSTALL it on your tablet or smartphone.

You can also create; RUN your apps using the code in these tutorials, with Android Studio. Android Studio is for desktop computers. Choose Java XML as the programming language. Android Studio is free to install and use for your android app development. Although not as convenient as testing your app on an actual android device; you can test your newly created app in Android Studio using an android emulator.

Complete Example Codes are available for each of our tutorials. With these example codes you can make a functioning android app in either AIDE or Android Studio.


You can get the code from this tutorial from our EXAMPLE CODE section on this page.

Learn How To Code a Webview Android Programming Java/xml


A Webview is good to use when you have links in your app.

Webview is ideal if your app has links to websites (a url) and the user will be clicking on them. Usually when a user clicks on a link within an app, they are prompted to select a browser to use to goto the link.

However, if you use Webview in your app for url links, then the user goes directly to the website url, no prompt is shown, and the link website is opened within your app.

Naming Your App Using AIDE

When creating your app, choose: android apps Java/xml template or example app.
You can name your app whatever you like; if your using the name as shown in our example code use;

WebView as the app name and,
for the package name use: com.acw.webview in the next line;

If you do use a different name just change the code to that name, where it says, com.acw.webview, in the coded pages, usually at the top of the java class pages.

The Code

Code for the app -WebView

For this app you will use these coded pages:

2 layout files main and webview both XML files

2 activity classes

one for button:

One for the webview:
Since we are clicking a url and going to a website; we need to add 'internet permission' to our manifest file.

For additional reading on the WebView class goto
Android Developer - Webview

EXAMPLE CODE - Code For This Tutorial

JUST USE YOUR MOUSE to copy the code for this tutorial App Name is 'WebView - located at AppProjects/WebView in AIDE, open the AIDE app, then open App Projects, THEN select the 'WebView', app from your files hierachy(left menu); then click on any file from the app, like strings.xml Make sure at top of page, the app name 'WebView' is there next to AppProjects like so: AppProjects/WebView, then you know you have the proper App.

Once a file is in the editor, you can edit, save it, then RUN your APP, Install, and Open your app.

Make sure you SAVED EACH PAGE, before you RUN your code. SAVE, RUN, INSTALL, OPEN, your WebView App. Once it has been installed on your tablet, you can open it Simply by Clicking on the Android little green App Icon,with the wording 'WebView' on your tablet. It will be with your other installed apps.

If you make further changes to this App, you need to SAVE, RUN, UPDATE, INSTALL, OPEN the app.

Example Code WebView :
Use Mouse To Copy Paste the Code

This free script provided by
JavaScript Kit

Share This Page

AIDE for creating Android Apps on your tablet or cell phone(android).
Free and Paid - with Free, create java/xml android template apps, two free android lessons.
With paid, create java/xml android template apps, many free android lessons, publish your apps to the marketplaces like Google Playstore and Amazon, and add a 'keystore' to your app.
GoTo Aide

ANDROID STUDIO - for creating Android Apps on your desktop computer.
Free to Install and Use
GoTo Android Studio Learn more - Android Studio

The Java XML files we code(example codes) and the Android Apps we create in our Free Tutorials are compatible with Android Studio and AIDE. Just choose Java XML as your Programming Language.

You May Like:
Make Sushi Rolls Taste World Wines Flavours and Aromas

Java XML
The Coded Pages

Beginners Article
About Our Tutorials
Coding androidmanifest.xml
Coding main.xml
Coding strings.xml
Coding drawables

Java XML
Learning To Code

Create A Simple
Android App

Change App Icon

Add Text and Style

Add Buttons To App

Placing Text in

Change View
Background Color

Change Screen

Add Image to
Activity View

Add Horizontal
Scroll View

Add a Frame Layout

How to Add Themes
To Your App

How To Code
Customized Styles

Code a Toast Message

Coding Resource


Java XML
Adding Functionality

Coding Shape
Drawable - Lines

Coding A WebView

Coding A Timed
Screen Splash

Coding A Gradient

Coding Fragments

Coding A
ListView Fragment

Coding a
Tabbed Fragment

Share Intent
for Text

Share Intent
for Images

Media Player
with Audio

from the Web

Add Clickable Button
To textView

Image Button with

Linear Layout with
weight attribute

OnClick Displays

Screen Density
Coding Practices


for android tablets

Android Studio
For desktop computers


Code Canyon Paid From $1 Free and Paid From $1


App Distribution
Launching Your Android App
How To Be Successful

Android App Libraries
What are they and how
to implement them

How To Implement

View All Articles

Coding Tools

Android Studio
Course - Paid

Java Programming
Course - Free

Git Hub Course

About Our Images

All images on this page are copyrighted material.
You can use the images included with each tutorial for the purpose of creating your android app. These images are not to be distributed or sold.


How To Add Your Google Key
To Manifest.xml
Web Article

How To Sign Your APK Web Article

Google Developer Console
Create Account Submit Your App
Web Article

Amazon App DRM - APK KEY
Amazon Developer Portal
Create Account - Submit Your App

Google's In-App Billing for App monetization.

Monetizing Your App
How Tos

Follow Us On Twitter