title: Transfer value to TAB Activity
body: <p>I've 4 Activities.</p>
  
  <p>The first Activity is used to input data, the second Activity is the TABs main Activity (extends TabActivity) to declare each tab Activity, and the 3rd and 4th Activity is tab activity.</p>
  
  <p>How can I transfer values from the first Activity to the third and fourth Activity?</p>
  
  <p>Here's my 1st Activity :</p>
  
  <pre><code>public class FirstActivity extends Activity {
    EditText inputName;
    EditText inputAddress;
  
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      //declaration layout
      inputName = (EditText) findViewById(R.id.editText1);
      inputAddress = (EditText) findViewById(R.id.editText2);
      Button btnNextScreen = (Button) findViewById(R.id.button1);
  
      //Listening to button event
      btnNextScreen.setOnClickListener(new View.OnClickListener() {
  
        public void onClick(View arg0) {
          //Starting a new Intent
          Intent nextScreen = new Intent(getApplicationContext(), MainTabActivity.class);
  
  
          //Sending data to another Activity
          //THIS IS THE VALUE I WANNA TRANSFER TO TAB ACTIVITY
          nextScreen.putExtra("name", inputName.getText().toString());
          nextScreen.putExtra("address", inputEmail.getText().toString());
  
          // starting new activity
          startActivity(nextScreen);
  
        }
      });
    }
  }
  </code></pre>
  
  <p>and here's my MainTabActivity :</p>
  
  <pre><code>public class MainTabActivity extends TabActivity {
  
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.maintabresto);
  
  
      Resources res = getResources(); // Resource object to get Drawables
      TabHost tabHost = getTabHost();  // The activity TabHost
      TabHost.TabSpec spec;  // Resusable TabSpec for each tab
      Intent intent;  // Reusable Intent for each tab
  
      // Create an Intent to launch an Activity for the tab (to be reused)
      intent = new Intent().setClass(this, InfoTab.class);
      // Initialize a TabSpec for each tab and add it to the TabHost
      spec = tabHost.newTabSpec("info").setIndicator("Info",
                        res.getDrawable(R.drawable.iconinfotab))
                    .setContent(intent);
      tabHost.addTab(spec);
  
      // Do the same for the other tabs
      intent = new Intent().setClass(this, MenuTab.class);
      spec = tabHost.newTabSpec("menu").setIndicator("Menu",
                        res.getDrawable(R.drawable.iconmenutab))
                    .setContent(intent);
      tabHost.addTab(spec);
  
      tabHost.setCurrentTab(2);
    }
  }
  </code></pre>
  
  <p>and here's my 3rd an 4th activity (i wanna display the value that i transfer before to textview in each activity) :</p>
  
  <pre><code>public class InfoTab extends Activity {
  
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.infotab);
  
      TextView txtname = (TextView) findViewById(R.id.textTEST1);
      TextView txtaddress = (TextView) findViewById(R.id.TextTEST2);
  
  
      //displaying data from previous activity
      //this is didnt work
      Intent i = getIntent();
      // Receiving the Data
      String name = i.getStringExtra("name");
      String address = i.getStringExtra("address");
  
      // Displaying Received data
      //this is didnt work
      txtname.setText(name);
      txtaddress.setText(address);
    }
  }
  </code></pre>
  
  <p>can anyone help me??
  i've try to do this on firts activity :</p>
  
  <pre><code>Intent nextScreen = new Intent(getApplicationContext(), InfoTab.class);
  </code></pre>
  
  <p>it works!(the value can be transfered to nextactivity, but instead opening the activity on tab, the activity opening individually (not on tab)...</p>
  
  <p>so my goal here, is to transfer value to each tab activity an they're opening below MainTabActivity.</p>
  
  <p>sorry, if my english isnt good.</p>