質問

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