我有一个列表视图。我设置了一个点击监听器。如果用户单击列表项,则新活动会“滑动”到视图中。后台活动保持静态并在屏幕上固定。
如何让新活动panel_slider
“更快地滑动”
panel_slider.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="0"
android:toYDelta="0%p"
android:duration="600"
/>
</set>
main_activity_slider
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="100%p"
android:toYDelta="0"
android:duration="700"
/>
</set>
Intent
Intent intent = new Intent(MainActivity.this, PlayPanel.class);
startActivity(intent);
overridePendingTransition (R.anim.main_activity_slide, R.anim.music_panel_slide);
答案 0 :(得分:0)
更改android:duration=
main_activity_slider
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate
android:fromYDelta="100%p"
android:toYDelta="0"
android:duration="100"
/>
</set>
持续时间是“逆转”