0

I am developing an android application, where in MainActivity i am creating the actionbar with tabs for the application. i do have set listener for Tab click of actionbar which launches new activity in the application...till this everything is working fine. Problem is : When new activity get created on Tab click, ActionBar of the application (which is created in main activity) is not shown....it shows application icon and name but NO TABS which i created in Main Activity.

I am no using any supported libraries to support previous versions of android. I am using Android 4.2.

Thanks in advance.

2 Answers2

0

A solution can be to extend the onCreateOptionMenu method as shown here.

This provides somewhat guidance on a possible solution, using fragments instead of activities.

Community
  • 1
  • 1
David Karlsson
  • 9,396
  • 9
  • 58
  • 103
0

I think the first answer to this question might help you: Android - Switch Tabs from within an Activity within a tab

Particularly the links to the example source code

Community
  • 1
  • 1
Corey Scott
  • 2,430
  • 3
  • 28
  • 33