WebSettings setDefaultZoom - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for WebSettings setDefaultZoom method.

This code example shows how to use the following methods:setAppCacheEnabled, setCacheMode, setDefaultZoom, setLoadWithOverviewMode, setSavePassword
     */ 
    private void setSettings() { 
        // Here we set various settings regarding browser experience. 
        WebSettings settings = webview.getSettings();
        webview.setInitialScale(1);
        settings.setSavePassword(false);
        settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
        settings.setAppCacheEnabled(false);
        settings.setUseWideViewPort(true);
        settings.setLoadWithOverviewMode(true);
        settings.setDefaultZoom(WebSettings.ZoomDensity.FAR);
    } 
 
    /** 
     * Initializes the BedditLoginClient and opens the oAuth2 url to begin the login process. 
     */ 
    private void openAuthBrowser() { 
        // Initialize the webClient 
        BedditLoginClient client = new BedditLoginClient(this);
        client.addUrlListener(this);
6
CodeRank
This code example shows how to use the following methods:setBuiltInZoomControls, setDefaultZoom, setLoadWithOverviewMode, setRenderPriority, setSupportZoom
		app_view.setHorizontalScrollBarEnabled(false);
		app_view.setHorizontalScrollbarOverlay(false);
		app_view.setVerticalScrollBarEnabled(false);
		app_view.setVerticalScrollbarOverlay(false);
         
        appViewSett.setRenderPriority( RenderPriority.HIGH );
        appViewSett.setBuiltInZoomControls(false);
        appViewSett.setSupportZoom(false);
        appViewSett.setDefaultZoom(WebSettings.ZoomDensity.FAR);
        appViewSett.setUseWideViewPort(true);
        appViewSett.setLoadWithOverviewMode(true);
         
        Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
        float width = display.getWidth();
        double scale = Math.ceil( ( width / app_width ) * 100 );
         
        Log.v( "app width", " = " + app_width );
        Log.v( "display width", " = " + width );
        Log.v( "current scale()", " = " + app_view.getScale() );
        Log.v( "scale", " = " + scale );
6
CodeRank
This code example shows how to use the following methods:setBuiltInZoomControls, setDefaultZoom, setDisplayZoomControls, setJavaScriptEnabled, setLayoutAlgorithm
		} 
	} 
	 
	@SuppressWarnings("deprecation") 
	public void applyRotationSetting(WebSettings settings) {
		settings.setBuiltInZoomControls(true);
		settings.setDisplayZoomControls(false);
		settings.setDefaultZoom(WebSettings.ZoomDensity.FAR);
		settings.setUseWideViewPort(true);
		settings.setLoadWithOverviewMode(true);
		settings.setJavaScriptEnabled(prefJavascript);
		settings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
	} 
	 
	public void syncSettings() { 
		 
		if (this.preferences != null) {
			prefCookie = preferences.getBoolean(SettingsKeys.KEY_COOKIE, true);
			prefCookieOnExit = preferences.getBoolean(SettingsKeys.KEY_COOKIEEXIT, true);
			prefJavascript = preferences.getBoolean(SettingsKeys.KEY_JAVASCRIPT, true);
6
CodeRank
This code example shows how to use the following methods:setAllowUniversalAccessFromFileURLs, setBuiltInZoomControls, setDatabaseEnabled, setDatabasePath, setDefaultZoom
This code example shows how to use the following methods:setDefaultZoom
		runOnUiThread(new Runnable() {
 
			@Override 
			public void run() { 
				// TODO Auto-generated method stub 
				webSettings.setDefaultZoom(ZoomDensity.FAR);
			} 
		}); 
		webSettings.setUserAgentString("webkit--proximiant");
		webSettings.setLayoutAlgorithm(LayoutAlgorithm.NORMAL);
		if (android.os.Build.VERSION.SDK_INT  >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
			webSettings.setAllowUniversalAccessFromFileURLs(true);
			webSettings.setAllowFileAccessFromFileURLs(true);
			webSettings.setAllowContentAccess(true);
			webSettings.setAppCacheEnabled(true);
		} 
		_myWebView.clearCache(true);
		_myWebView.clearHistory();
		_myJsBridge = new WebAppInterface(this);
		_myJsBridge.addObserver(this);
3
CodeRank
This code example shows how to use the following methods:setBuiltInZoomControls, setDatabaseEnabled, setDefaultFixedFontSize, setDefaultFontSize, setDefaultZoom
    view.setFocusable(true);
    view.setFocusableInTouchMode(true);
 
    // Webview settings 
    WebSettings settings = view.getSettings();
    settings.setJavaScriptCanOpenWindowsAutomatically(true);
    settings.setSupportMultipleWindows(true);
    settings.setBuiltInZoomControls(true);
    settings.setJavaScriptEnabled(true);
    /*settings.setAppCacheEnabled(true); 
    settings.setAppCacheMaxSize(10*1024*1024); 
    settings.setAppCachePath("");*/ 
    settings.setDatabaseEnabled(true);
    settings.setDomStorageEnabled(true);
    settings.setGeolocationEnabled(true);
    settings.setSaveFormData(true);
    settings.setRenderPriority(WebSettings.RenderPriority.HIGH);
 
    // Same as the browser settings 
    settings.setLoadWithOverviewMode(true);

-2
CodeRank

Related WebSettings setDefaultZoom Questions & Answers:

setDefaultZoom Method Overview
This method was deprecated in API level 19. This method is no longer supported, see the function documentation for recommended alternatives.
See Code Examples for other Android WebSettings Methods: