首页 > 解决方案 > 为什么我不能使用在 android 动画资源中,就像 API 28 中的 activity_open_enter.xml

问题描述

我喜欢来自 android Pie 的活动之间的转换,所以我想将它导入到我自己的应用程序中,但是处理文件:activity_open_enter.xml from \Sdk\platforms\android-28\data\res\anim导致我的错误IDE:

Element <cliprect is not allowed here.

.

<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<translate
    android:fromYDelta="4.1%"
    android:toYDelta="0"
    android:interpolator="@android:interpolator/accelerate_decelerate"
    android:duration="425"/>
<cliprect
    android:fromLeft="0%"
    android:fromTop="95.9%"
    android:fromRight="100%"
    android:fromBottom="100%"
    android:toLeft="0%"
    android:toTop="0%"
    android:toRight="100%"
    android:toBottom="100%"
    android:interpolator="@interpolator/fast_out_extra_slow_in"
    android:duration="425"/>

我的最低 api 是 21,我的目标是 28

标签: androidandroid-studio

解决方案


这是 Android 的私有组件,不能使用。


推荐阅读