Code example for WebView: Displaying web pages

Methods: getSettingsloadUrlsetInitialScalesetWebViewClient

0
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.suggestions);
		 
        wv = (WebView) findViewById(R.id.suggestionwebview);
        wv.setWebViewClient(new LibWebViewClient());
         
        wv.getSettings().setJavaScriptEnabled(true);
        wv.loadUrl("file:///android_asset/suggestions.html");
        //wv.loadUrl("file:///android_asset/path_100_200.png"); 
 
        wv.setInitialScale(100);
 
    } 
	@Override 
	public void onStop() { 
		super.onStop(); 
	} 
 
	@Override 
Stop searching for code, let great code find you!  Add Codota to your java IDE