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

有帮助吗?

解决方案 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.

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top