Lesson Plan: Unit - 07
Subject: P15A2AAD - Android Application Development
Topic of Study: Browsing the Web with WebView
Grade/Level: Master of Computer Applications
Objective: Browsing the Web with WebView
Time Allotment: 55 Minutes
Subject: P15A2AAD - Android Application Development
Topic of Study: Browsing the Web with WebView
Grade/Level: Master of Computer Applications
Objective: Browsing the Web with WebView
Time Allotment: 55 Minutes
- Browsing the Web with WebView
- Applications that retrieve and display content from the Web often end up displaying that data on the screen.
- Android applications can simply use the WebView control to display web content to the screen.
- The WebView control uses the WebKit rendering engine to draw HTML content on the screen.
- WebKit is an open source browser engine.
- Note: You can read more at http://webkit.org.
- Using the WebView control requires the android.permission.INTERNET permission.
- Launching the Browser via an Intent does not require any special permissions.
- Exa.
- Step 01: Design of Component Tree
- Step 02: Design of Blueprint
xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".MainActivity">
<TextView android:id="@+id/textView" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="Website:" />
<EditText android:id="@+id/editText2" android:layout_width="match_parent" android:layout_height="wrap_content" android:ems="10" android:inputType="textPersonName" android:text="http://www.ampics.ac.in" />
<Button android:id="@+id/button2" android:layout_width="match_parent" android:onClick="openWeb" android:layout_height="wrap_content" android:text="Open Now" />
</LinearLayout>
- Step 03: Code in Java File
- Step 04: Output