0

I'm developing an application and I want to place two activities in a tabbed layout. I need the ability for the first activity to send an intent and programmatically switch to the second tabbed activity. This seems possible and is outlined in other posts:

Launching activities within a tab in Android

However, this approach doesn't seem advisable and it makes use of ActivityGroup, which is now deprecated. Can anyone recommend a stable solution that would meet my design needs?

Community
  • 1
  • 1
William Seemann
  • 3,440
  • 10
  • 44
  • 78

1 Answers1

1

You may want to take a look at ViewPager from the support library, coupled with https://github.com/JakeWharton/Android-ViewPagerIndicator/blob/master/library/src/com/viewpagerindicator/TabPageIndicator.java

It will produce a tab-like interface that you can swipe through. You can explicitly change which tab is being shown by calling viewPager.setCurrentItem(int).

Jon Willis
  • 6,993
  • 4
  • 43
  • 51