WebView - exibir página web

Top  Previous  Next

Tela

 

Java

 

package com.laioutes;

 

import android.app.Activity;

import android.os.Bundle;

import android.webkit.WebSettings;

import android.webkit.WebView;

 

public class LayoutsActivity extends Activity {

 

 @Override

 public void onCreate(Bundle savedInstanceState) {

         super.onCreate(savedInstanceState);

         setContentView(R.layout.gridview);

 

         WebView web = new WebView(this);

 

         WebSettings webSettings = web.getSettings();

         webSettings.setSavePassword(false);

         webSettings.setSaveFormData(false);

         webSettings.setJavaScriptEnabled(true);

         webSettings.setSupportZoom(false);

 

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

 

         setContentView(web);

 }

}

 

xml

*não tem