我想从这个活动中发送价值
public class HomeActivity extends android.app.TabActivity
{
String uid;
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
TabHost tabHost = getTabHost();
Intent intent = getIntent();
uid = intent.getStringExtra("uid");
// Tab for ActivityOne
TabSpec photospec = tabHost.newTabSpec("Home");
photospec.setIndicator("Home", getResources().getDrawable(R.drawable.one));
Intent photosIntent = new Intent(this, TabhomeActivity.class);
photosIntent.putExtra("uid", uid);
// startActivityForResult(photosIntent,0);
photospec.setContent(photosIntent);
// Tab for ActivitySecond
TabSpec songspec = tabHost.newTabSpec("Today's Meeting");
// setting Title and Icon for the Tab
songspec.setIndicator("Today's Meeting",
getResources().getDrawable(R.drawable.one));
Intent songsIntent = new Intent(this,TodaysmeetingActivity.class);
songspec.setContent(songsIntent);
// Adding all TabSpec to TabHost
tabHost.addTab(photospec); // Adding photos tab
tabHost.addTab(songspec); // Adding songs tab
}
}
到这个活动..
public class TabhomeActivity extends Activity {
Button button1;
Button button2;
Button button3;
TextView txtview,shwname;
String uid;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tabhome);
Intent intent = getParent().getIntent();
uid = intent.getStringExtra("uid");
shwname=(TextView)findViewById(R.id.textView3);
shwname.setText("Hi\t"+uid);
}
谁能帮我??请。提前致谢。