Swipe activities on Android

I have 4 actions in which I have to scroll them left and right, and if I am in the last action, and swipe left, then again I need to show the first activity.

Can anyone understand how I can achieve this? or some sample code?

Thank you very much.

+4
source share
4 answers

you can achieve this by animaton .. But it will be displayed as a gallery view, and you can also carry ... OnTouchEvent with each action you can call another action using overridePendingTransition (R.anim.act_back_slide_enter, R.anim.act_back_slide_leave);

// overridePendingTransition ("animation for activity that goes in", "animation for activity that goes out");

I have not tried this yet ... but we can do it in this form. If you get success, let me know.

+2
source
+2
source

I recently posted a question that covers many of them (my question is about using Swipe with ScrollView, the Swipe file itself works just fine):

Tab / Fling change with ScrollView?

If you read the sources I listed and use the code I provided, you should do it.

0
source

It works great ... just need to delete the redundant R.java file ...!

http://www.codeshogun.com/blog/2009/04/16/how-to-implement-swipe-action-in-android/

-1
source

Source: https://habr.com/ru/post/1341141/


All Articles