DragImageView下拉拖动图片放大,先上图:
主要的类:继承了RelativeLayout,再在RelativeLayout里面添加ImageView,通过Touch事件来改变ImageView的缩放,缩放时计算scale,使其在手指移动到屏幕底部时,图片底部也刚好到达屏幕底部,手指松开时,图片逐步回弹。
package com.example.dragimagescale;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Context;
im