0

I've just decided to add swipe views on my android application. I searched for them on the web for tutorials but I found nothing but deprecated actionBar tutorials. Event in official Creating Swipe View from android developer is showing me that this is deprecated method for this purpose. So tell me guys - what's the best way to make a swipe tab view?

Stanimir Yakimov
  • 864
  • 3
  • 14
  • 31

3 Answers3

0

I think you can use the templates included with ADT. Just create new "Android Application Project" and select "tabbed activity" during wizard flow, and select "Navigation Style" = "swipe views" on the last wizard screen.

You can either develop your application on base of code you received, or study it to understand how swipe and tabs are working together.

Andrey Kopeyko
  • 1,556
  • 15
  • 14
0

Action bar tab is now depreciated because of new toolbar facility . You can use now Sliding tab https://developer.android.com/samples/SlidingTabsBasic/src/com.example.android.common/view/SlidingTabLayout.html for creating swipe views using view pager

0

Use a Sliding tab Layout.

Get the Sliding Tab Layout & Sliding Tab Strip java file in the following link. https://github.com/google/iosched/tree/master/android/src/main/java/com/google/samples/apps/iosched/ui/widget

Copy the 2 into your project and follow the follwing tutorial. Note: Dont copy the one in the developers android website its not updated as far as I know

https://www.youtube.com/watch?v=Fl0xMuo10yA&index=26&list=PLonJJ3BVjZW6CtAMbJz1XD8ELUs1KXaTD

I had the same problem.