All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qozix.layouts.ScalingLayout Maven / Gradle / Ivy

Go to download

The TileView widget is a subclass of ViewGroup that provides a mechanism to asynchronously display tile-based images, with additional functionality for 2D dragging, flinging, pinch or double-tap to zoom, adding overlaying Views (markers), built-in Hot Spot support, dynamic path drawing, multiple levels of detail, and support for any relative positioning or coordinate system.

The newest version!
package com.qozix.layouts;

import android.content.Context;
import android.graphics.Canvas;

public class ScalingLayout extends FixedLayout {

	private double scale = 1;

	public ScalingLayout( Context context ) {
		super( context );
		setWillNotDraw( false );
	}

	public void setScale( double factor ) {
		scale = factor;
		postInvalidate();
	}

	public double getScale() {
		return scale;
	}

	@Override
	public void onDraw( Canvas canvas ) {
		canvas.scale( (float) scale, (float) scale );
		super.onDraw( canvas );
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy