# MovingImageDemo **Repository Path**: androidzk/MovingImageDemo ## Basic Information - **Project Name**: MovingImageDemo - **Description**: 图片可以移动的ImageView - **Primary Language**: Android - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 10 - **Forks**: 0 - **Created**: 2016-05-04 - **Last Updated**: 2022-11-16 ## Categories & Tags **Categories**: android-modules **Tags**: None ## README #效果(录屏软件不好用,录制出来的效果一般) ![输入图片说明](http://git.oschina.net/uploads/images/2016/0504/150135_04c3ed96_312885.gif "在这里输入图片标题") #代码示例 ``` ``` ``` moveIv.getMovingAnimator().addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { Log.i("MainActivity", "Start"); } @Override public void onAnimationEnd(Animator animation) { Log.i("MainActivity", "End"); } @Override public void onAnimationCancel(Animator animation) { Log.i("MainActivity", "Cancel"); } @Override public void onAnimationRepeat(Animator animation) { Log.i("MainActivity", "Repeat"); } }); ``` ``` @Override protected void onResume() { super.onResume(); moveIv.getMovingAnimator().start(); } @Override protected void onStop() { super.onStop(); moveIv.getMovingAnimator().cancel(); } ```