Mariachi
Mariachi

Reputation: 305

Switching between activities Android

I have an Android app with two classes:
-MainActivity
-SecondActivity
I have also two layouts for these classes (they are pretty similar).
I want to switch between these activities by 'shifting' to the right or to the left.
All materials I find are about switching by button.

Upvotes: 0

Views: 62

Answers (1)

AlphaQ
AlphaQ

Reputation: 676

Anyone would recommend using Fragments and ViewPager instead of Activity since you want sliding action and make use of the Android TabLayout.

Here is a tutorial that you can draw a basic idea from.

Upvotes: 2

Related Questions