2
我的目標是將當前視圖從當前位置(居中)動畫到其父項的頂部邊界。那可能嗎?我已經嘗試下面的代碼,但問題是,我認爲動畫後消失:Android查看頂級父項的動畫
Animation bottomUp = AnimationUtils.loadAnimation(context, R.anim.bottom_up);
popup.startAnimation(bottomUp);
和
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="100%"
android:toYDelta="0%"
android:fillAfter="true"
android:duration="500"/>
</set>