gpt4 book ai didi

android-fragments - 碎片,安卓 :zAdjustment (z order) and animations

转载 作者:行者123 更新时间:2023-12-03 10:42:55 25 4
gpt4 key购买 nike

我正在使用支持库。现在,我想让一个片段从底部移入,移动到前一个片段上。

为此,我使用它来保持前一个片段(正在滑过的片段)可见,直到新片段就位:

<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:fromAlpha="1.0" android:toAlpha="1.0"
android:duration="2500"
android:zAdjustment="bottom" />

这是用于新片段从底部滑入的动画:
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%p" android:toYDelta="0"
android:duration="@android:integer/config_mediumAnimTime"
android:zAdjustment="top"/>

我已经将 z 调整放在底部和顶部,但“底部”动画仍然在新片段的顶部!我已经将持续时间设置为 2500 进行测试,并且它一直处于领先地位。

zAdjustment 不适用于片段动画吗?

最佳答案

根据 this google group thread Z 调整仅适用于窗口动画。

“Z 调整仅适用于窗口动画。我认为这是记录在案的,但显然没有。”
-- Dianne Hackborn(Android 框架工程师)

关于android-fragments - 碎片,安卓 :zAdjustment (z order) and animations,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12155845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com