ZoomButtonsController setOnZoomListener - 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 setOnZoomListener 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, 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: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:getContainer, setAutoDismissed, setOnZoomListener, setZoomInEnabled, setZoomOutEnabled
This code example shows how to use the following methods:getContainer, setAutoDismissed, setOnZoomListener, setZoomInEnabled, setZoomOutEnabled
	{ 
		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
This code example shows how to use the following methods:setOnZoomListener
		setFocusable(true);
		scroller = new Scroller(context);
		gestureDetector = new GestureDetector(context, this);
		scaleGestureDetector = new ScaleGestureDetector(context, this);
 
		zoomController = new ZoomButtonsController(this);
		zoomController.setOnZoomListener(this);
 
		matrix = new Matrix();
		destination = new float[2];
 
		// setVerticalScrollBarEnabled(true); 
		// setHorizontalScrollBarEnabled(true); 
 
	} 
 
	/** 
	 * Displays a bitmap 
	 *  
	 * @param bitmap 
4
CodeRank

Related ZoomButtonsController setOnZoomListener Questions & Answers:

setOnZoomListener Method Overview
Sets the ZoomButtonsController.OnZoomListener listener that receives callbacks to zoom.
See Code Examples for other Android ZoomButtonsController Methods: