I am getting some glitches while making a tab enabled application.
I want to share data, between two tabs of my application.
How can I achieve the same?
Rgds Rob
You need to use intents to different activities, or in that case of tabs.
Go to Android Common Tasks
And look at the subject below "some intent examples". This will get you started.
You basically need to put whatever values you want into a bundle and pass that over to the new activity using intent.putextras();
the correct way is setting a static field into the activity that creates the tabs
public class greformanews extends TabActivity {
public static String JorgesysTitle;
...
...
...
so in your Activity defined in tab 1
@Override
protected void onPause() {
greformanews.JorgesysTitle = "JORGESYS =)";
super.onPause();
}
in your Activity defined in tab 2
//get value defined in Activity 1 !:)
String Title = greformanews.JorgesysTitle