0

我已经实现了一个有很多活动的应用程序...... 我想以整个活动之间的快速过渡方式将一个活动实现为左右,反之亦然。例如

因此,当您点击 next 时,应该在 next 活动之间进行转换,而当您点击 previous 时,应该在 previous 之间进行转换。我应该如何实现这个?......它的投掷但不是触摸,而是使用那些按钮......

4

2 回答 2

1

Check out ViewFlipper (video demo here), ViewPager, or ViewPagerIndicator.

于 2012-11-18T02:14:26.467 回答
0

Define translation animations in xml then use overridePendingTransition BEFORE setContentView in each Activity. E.g. overridePendingTransition(R.anim.slidein, R.anim.slideout); You probably need to put this in onResume if you want it to work both ways (i.e. when you're going from and back to that Activity.).

于 2012-11-18T02:18:40.893 回答