User616263
User616263

Reputation: 467

load a website in webview

I created an xml file contains a webview.

I hope to load http://www.google.com in this webview

How can I do it?

Upvotes: 1

Views: 1157

Answers (3)

Sankar Ganesh PMP
Sankar Ganesh PMP

Reputation: 12037

did you add permission for accessing Internet in your Manifest file as shown below,

 <uses-permission android:name="android.permission.INTERNET" />

add the above line, before application tag beins

Upvotes: 1

Parag Chauhan
Parag Chauhan

Reputation: 35986

try this

webview.loadUrl("http://www.google.com");

Upvotes: 0

Cristian
Cristian

Reputation: 200160

It's funny because the official example uses Google as the test page:

http://developer.android.com/resources/tutorials/views/hello-webview.html

Upvotes: 0

Related Questions