Android为特定焦点放大动画
我需要放大ImageView以显示图像的一部分。Android为特定焦点放大动画,android,imageview,android-animation,Android,Imageview,Android Animation,我需要放大ImageView以显示图像的一部分。 这是我的动画XML代码: <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true"> <scale xmlns:android="http://schemas.android.com/apk/res/and
这是我的动画XML代码:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:fillAfter="true">
<scale xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="2000"
android:fromXScale="1"
android:fromYScale="1"
android:toXScale="2"
android:toYScale="2"
android:pivotX="100%"
android:pivotY="0%" >
</scale>
</set>
它工作正常,将图像“放大”到右角,但图像也会缩放,并覆盖其他项目,如按钮、其他图像。我正在寻找一种方法,在is框(ImageView init size)中“阻止”图像,并隐藏缩放图像时得到的图像部分。
我告诉你我的问题,我希望有一个解决办法 动画制作前(原创):
发布动画(图像上方的按钮):
我需要什么:
使用以下方法:
PhotoViewAttacher imageAttacher;
imageAttacher = new PhotoViewAttacher(imageView);
imageAttacher.update();
在此处查找渐变依赖项:
使用以下方法:
PhotoViewAttacher imageAttacher;
imageAttacher = new PhotoViewAttacher(imageView);
imageAttacher.update();
在此处查找渐变依赖项:
试试这个库很简单,谢谢!!!!它适用于这个库…有没有办法设置最大缩放比例?试试这个库它很简单谢谢!!!!它与这个库一起工作……有没有办法设置最大缩放比例?