我用我的片段之間的動畫:Android的新片段,片段動畫中出現以下舊
在幻燈片左起:
<?xml version="1.0" encoding="utf-8"?>
<set>
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="600"
android:propertyName="x"
android:valueFrom="2000"
android:valueTo="0"
android:valueType="floatType"
android:fillAfter="true"/>
</set>
幻燈片中右:
<?xml version="1.0" encoding="utf-8"?>
<set>
<objectAnimator
xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="600"
android:propertyName="x"
android:valueFrom="0"
android:valueTo="-400"
android:valueType="floatType"/>
</set>
該動畫將前一個片段移到左側,而新的片段從右側移動。我使用它與片段事務。
transaction.setCustomAnimations(R.animator.slide_in_from_left,R.animator.slide_in_from_right);
我有麻煩時,新的片段來他下面的一個較舊的滑動,用於修復它,我把一個標高上我的新片段,但我想21的下方 對API的解決方案是否有可能強制新片段高於舊片段
我把高程,因爲它是我找了把上面的動畫,在過去一個新片段的唯一途徑。您向我展示的鏈接說明如何重現陰影效果確定高程的外觀,但這不會解決我的問題 – Vodet
請參閱我的編輯答案。 – Geryson