Android放大动画

问题描述 投票:0回答:1

[当我使用动画放大PDF视图时,之后我无法使用缩小缩放功能缩小,当我不使用动画时,我可以轻松地使用缩小缩放功能放大和缩小。我看不到问题,是否有一些代码可以模拟缩放某些X和Y值的代码?

我的Zoom xml文件

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true">
    <scale
        android:duration="600"
        android:fromXScale="1"
        android:fromYScale="1"
        android:pivotX="50%"
        android:pivotY="50%"
        android:toXScale="3"
        android:toYScale="3"/>
</set>
android zoom pinchzoom
1个回答
0
投票

像这样编写zoom_out.xml文件,

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <scale
        android:duration="1000"
        android:fromXScale="1.0"
        android:fromYScale="1.0"
        android:pivotX="50%"
        android:pivotY="50%"
        android:toXScale=".2"
        android:toYScale=".2" />
</set>

和zoom_in.xml文件,例如,

<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
    <scale
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:duration="600"
        android:fromXScale="2"
        android:fromYScale="2"
        android:pivotX="50%"
        android:pivotY="50%"
        android:toXScale="4"
        android:toYScale="4" >
    </scale>
</set>
© www.soinside.com 2019 - 2024. All rights reserved.