相关疑难解决方法(0)

TouchImageView如何工作?

我有一个很好的工作TouchImageView,我想知道它是如何工作的代码:我只想做的是能够捏缩放,或使用双击放大我选择的任何imageview,当我缩放我返回图像的原始大小.TouchImageView.java:

public class TouchImageView extends ImageView {

Matrix matrix = new Matrix();

static final int NONE = 0;
static final int DRAG = 1;
static final int ZOOM = 2;
int mode = NONE;

PointF last = new PointF();
PointF start = new PointF();
float minScale = 1f;
float maxScale = 3f;
float[] m;

float redundantXSpace, redundantYSpace;

float width, height;
static final int CLICK = 3;
float saveScale = 1f;
float right, bottom, origWidth, origHeight, bmWidth, bmHeight;

ScaleGestureDetector mScaleDetector;

Context …
Run Code Online (Sandbox Code Playgroud)

java android image

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

android ×1

image ×1

java ×1