我需要在RelativeLayout内部移动
ImageView(或其他任何东西).有没有人知道这样做的正确方法?
解决方法
Menseure ImageView的layout_height和layout_width设置为fill_parent.然后做:
要移动视图,请使用Matrix.这非常方便.
Matrix matrix = new Matrix(); matrix.reset(); matrix.postTranslate(x,y); imageview.setScaleType(ScaleType.MATRIX); imageview.setImageMatrix(matrix);