I need to create a tab layout with two tabs . Each tab should an activity like Activity1 and Activity2. Activity2 Should Have a button . When I click the button in Activity2, it goes to another new activity Activity3. Now I am in Activity3 and when I press back button of device ,it should come to Activity2 along with tab layout.
How to do this? Please help me.
You Need to use Activity Group for Retaining Tab Bar in Next Activity.
Check this Post for using Tab Bar using Activity Group :
Activity Group within Tabhost and Link for Activity Group and Sample code for the same