ZoomButtonsController getZoomControls - top ranked examples from Open Source projects

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

This code example shows how to use the following methods:getZoomControls, setOnZoomListener, setZoomInEnabled, setZoomOutEnabled
        } 
        boolean canZoomIn = mAwContents.canZoomIn();
        boolean canZoomOut = mAwContents.canZoomOut();
        if (!canZoomIn && !canZoomOut) {
            // Hide the zoom in and out buttons if the page cannot zoom 
            zoomController.getZoomControls().setVisibility(View.GONE);
        } else { 
            // Set each one individually, as a page may be able to zoom in or out 
            zoomController.setZoomInEnabled(canZoomIn);
            zoomController.setZoomOutEnabled(canZoomOut);
        } 
    } 
 
    // This method is used in tests. It doesn't modify the state of zoom controls. 
    View getZoomControlsViewForTest() {
        return mZoomButtonsController != null ? mZoomButtonsController.getZoomControls() : null;
    } 
 
    private ZoomButtonsController getZoomController() {
        if (mZoomButtonsController == null &&

6
CodeRank
This code example shows how to use the following methods:getZoomControls, setOnZoomListener, setZoomInEnabled, setZoomOutEnabled
        } 
        boolean canZoomIn = mAwContents.canZoomIn();
        boolean canZoomOut = mAwContents.canZoomOut();
        if (!canZoomIn && !canZoomOut) {
            // Hide the zoom in and out buttons if the page cannot zoom 
            zoomController.getZoomControls().setVisibility(View.GONE);
        } else { 
            // Set each one individually, as a page may be able to zoom in or out 
            zoomController.setZoomInEnabled(canZoomIn);
            zoomController.setZoomOutEnabled(canZoomOut);
        } 
    } 
 
    // This method is used in tests. It doesn't modify the state of zoom controls. 
    View getZoomControlsViewForTest() {
        return mZoomButtonsController != null ? mZoomButtonsController.getZoomControls() : null;
    } 
 
    private ZoomButtonsController getZoomController() {
        if (mZoomButtonsController == null &&

6
CodeRank
This code example shows how to use the following methods:getZoomControls, isVisible, setOnZoomListener, setVisible
        } 
    } 
 
    void dismissZoomPicker() { 
        ZoomButtonsController zoomControls = getZoomControls();
        if (zoomControls != null && zoomControls.isVisible()) {
            zoomControls.setVisible(false);
        } 
    } 
 
    boolean isMultiTouchZoomSupported() { 
        return !mMultiTouchListener.getPermanentlyIgnoreDetectorEvents();
    } 
 
    boolean isScaleGestureDetectionInProgress() { 
        return isMultiTouchZoomSupported() 
                && mMultiTouchDetector.isInProgress();
    } 
 
    // Passes the touch event to ScaleGestureDetector so that its internal 

6
CodeRank
This code example shows how to use the following methods:getContainer, getZoomControls, setAutoDismissed
    public static void init(MapView mapView) {
 
        // ズームボタンの設定 
        mapView.setBuiltInZoomControls(true);
        ZoomButtonsController zoombuttonsCtrl = mapView.getZoomButtonsController();
        LayoutParams params = zoombuttonsCtrl.getContainer().getLayoutParams();
        params.height = LayoutParams.FILL_PARENT;
        zoombuttonsCtrl.setAutoDismissed(false);
        ZoomControls zoomCtrl = (ZoomControls)zoombuttonsCtrl.getZoomControls();
        zoomCtrl.getLayoutParams().width = LayoutParams.FILL_PARENT;;
        zoomCtrl.setGravity(Gravity.RIGHT);
        zoomCtrl.setPadding(0, 65, 0, 0);
         
        // 地図表示 
        mapView.setSatellite(true);
 
        // デフォルトの表示位置、ズームサイズ 
    	mapCtrl = mapView.getController();
        mapCtrl.setCenter(GEO_YOKOHAMA);
        mapCtrl.setZoom(ZOOM_NORMAL);
6
CodeRank
This code example shows how to use the following methods:getZoomControls, setVisible
 
    @Override 
    public boolean onTouchEvent(MotionEvent ev) {
        boolean result = super.onTouchEvent(ev);
        if (zoomButtons != null) {
            zoomButtons.setVisible(false);
            zoomButtons.getZoomControls().setVisibility(View.GONE);
        } 
        return result;
    } 
 
} 
5
CodeRank
This code example shows how to use the following methods:getZoomControls, isVisible
				FrameLayout.LayoutParams frameParams = (FrameLayout.LayoutParams) params;
				frameParams.gravity = Gravity.RIGHT;
			} 
		} 
		log.debug("MyWebView.getZoomButtonsController() mZoomButtonsController=" + mZoomButtonsController);
		log.debug("mZoomButtonsController.isVisible()=" + mZoomButtonsController.isVisible());
		return mZoomButtonsController;
	} 
 
//	@Override 
//	public boolean onTouchEvent(MotionEvent ev) { 
//		log.verbose("ev.getAction(): " + ev.getAction() + ", getScale(): " + getScale() + ", zoomIn(): " + zoomIn()); 
//		 
//		final float density = getContext().getResources().getDisplayMetrics().density; 
//		log.verbose("density=" + density); 
//		 
//		return super.onTouchEvent(ev); 
//	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:getContainer, getZoomControls, setAutoDismissed, setOnZoomListener, setZoomInEnabled
	{ 
		if (mZoomButtons == null) 
		{ 
			ViewGroup parent = (ViewGroup)this.getParent(); 
			 
	    	mZoomButtons = new ZoomButtonsController(parent); 
	    	mZoomButtons.setAutoDismissed(false); 
	    	mZoomButtons.setZoomSpeed(30); 
	    	mZoomButtons.setOnZoomListener(new ZoomButtonsController.OnZoomListener() 
			{ 
				public void onZoom(boolean zoomIn) 
				{ 
					float scale; 
					 
//					Log.d("ZoomableImageView", "onZoom" + (zoomIn ? "In" : "Out")); 
					 
					if (zoomIn) 
						scale = 1.1f; 
					else 
						scale = 0.9f; 

5
CodeRank

Related ZoomButtonsController getZoomControls Questions & Answers:

getZoomControls Method Overview
Gets the view for the zoom controls.
See Code Examples for other Android ZoomButtonsController Methods: