Click here to Skip to main content
15,891,762 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to pass below FirmName to next activity that extents tabactivity and implements OnTabChangeListener

Normal Activity
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
setupVeiw();

bttnAbtUs.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v)
{

Intent i = new Intent(Home.this,Tabhost.class);
i.putExtra("FirmName","Ammar");
startActivity(i);
finish();
}
} );


Next Activity

public class Tabhost extends TabActivity implements OnTabChangeListener{

/** Called when the activity is first created. */
TabHost tabHost;
String FirmName;


@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_tabhost);


Intent intent = getIntent();
FirmName= intent.getStringExtra("FirmName");

This is normal method i do for other activity and its work but for tabActivity its doesnot work..i cant get value...please help me with this..thank you
Posted
Updated 21-Jul-14 20:47pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900