Question

I am having a TabActivity class which is hosting three tabs Tab1 Tab2 and Tab3 I want to start an activity from tab2 which delivers result to tab1. All the tabs are hosted in a class MyTabActivity.java Plz help guyz

Was it helpful?

Solution 3

Got a solution for the issue. It is difficult to start an intent for result when a particular tab is pressed as the result can not be recieved. The simple solution for this is to use public static variables to get data from one class to another.

OTHER TIPS

Activity assigned to tabs cannot be replaced with another activity. Instead try changing its contents.

You can use public abstract MenuItem add (int groupId, int itemId, int order, int titleRes) method for this TabActivity like,..

menu.add(1, 1, 1, "TAB1");

and you can refer this link for the next steps,..

http://developer.android.com/reference/android/view/Menu.html#add%28int,%20int,%20int,%20int%29

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top