0% found this document useful (0 votes)
20 views

Android Tutorial: Create by (Afriyudi, M.Kom)

This document provides a 4-step tutorial for creating a basic Android web view app. It instructs the user to create an Android project with a WebView component in the main XML layout. Then in the Java activity, it has the user load some sample HTML into the WebView using loadData. Finally it compiles and runs the app, then adds to modify the HTML and re-run it to see the changes.

Uploaded by

Marlinda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Android Tutorial: Create by (Afriyudi, M.Kom)

This document provides a 4-step tutorial for creating a basic Android web view app. It instructs the user to create an Android project with a WebView component in the main XML layout. Then in the Java activity, it has the user load some sample HTML into the WebView using loadData. Finally it compiles and runs the app, then adds to modify the HTML and re-run it to see the changes.

Uploaded by

Marlinda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Android Tutorial

Create by
(Afriyudi, M.Kom)
Membuat project

android create project


--target 1
--name MyAndroidWebViewApp
--path <your Directory>/MyAndroidWebViewAppProject
--activity MyAndroidWebViewAppActivity
--package id.ubd.myandroidwebview
Step 1 :Insert WebView in main.xml

<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
Step 2 : open file
MyAndroidWebViewAppActivity and add this
code

WebViewmyWebView=(WebView)findViewById(R.id.webview);
Stringhtml="<html><body>Hello<b>Android</b>,I'mUsingWeb
View</body></html>";
myWebView.loadData(html,"text/html","utf8");
Step 3 : compile dan running
Step 4 : tambahkan tabel dan beri warna
kemudian compile dan lihat hasilnya

You might also like