效果图
代码
/**
* 根据手指拖动的当前位置,自动贴边的View
*/
public class DragView extends ImageView implements View.OnTouchListener{
private int screenWidth;
private int screenHeight;
private Context mContext;
private int lastX, lastY;
private int left ,top;
private ViewGroup.MarginLayoutParams layoutParams;