If I have three activities, I want to move from one activity to another when touching the moving on the screen horizontally(from left to right or right to left). how to access the action of sliding the screen and ?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
try this:
try {
Intent newIntent = new Intent(view.getContext(), NewActivity.class);
startActivityForResult(newIntent, 0);
overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);
} catch(Exception ex) {
}
回答2:
http://android-developers.blogspot.in/2011/08/horizontal-view-swiping-with-viewpager.html
and
http://blog.velir.com/index.php/2010/11/17/android-snapping-horizontal-scroll/