how to send the values from TabActivity to Activity?

Posted by Anil M H on Stack Overflow See other posts from Stack Overflow or by Anil M H
Published on 2013-06-26T13:49:09Z Indexed on 2013/06/27 4:22 UTC
Read the original article Hit count: 179

Filed under:
|

In my TabActivity , i'm sending value to other Activity how to do that

in this TabActivity how can i send the bundle to other Activity plz tell me how to pass the value to my other ReceivedList Activity plz tell me ....

    public class TabViewForSendAndRecv extends TabActivity{

private TabActivity tabhost1;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tabviewforsendandrecv);


    Bundle bundle = getIntent().getExtras();
    String stuff = bundle.getString("number"); 



         final TabHost tabHost = getTabHost(); 



      TextView txtTab = new TextView(this);
        txtTab.setText("Received Alerts");
        txtTab.setPadding(8, 9, 8, 9);
        txtTab.setTextColor(Color.WHITE);
        txtTab.setTextSize(14);
        //txtTab.setTypeface(localTypeface1);
        txtTab.setGravity(Gravity.CENTER_HORIZONTAL |                                            Gravity.CENTER_VERTICAL);


        TabHost.TabSpec spec;

        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("Tab1").setIndicator(txtTab).
        setContent(new Intent(this, ReceivedList.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));


        tabHost.addTab(spec);




      //tab 2


        TextView txtTab1 = new TextView(this);
        txtTab1.setText("Sent Alerts");
        txtTab1.setPadding(8, 9, 8, 9);
        txtTab1.setTextColor(Color.WHITE);
        txtTab1.setTextSize(14);
        //txtTab.setTypeface(localTypeface1);
        txtTab1.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL);


        TabHost.TabSpec spec1;
        // Initialize a TabSpec for each tab and add it to the TabHost
        spec1 = tabHost.newTabSpec("Tab2").setIndicator(txtTab1).setContent(new Intent(this, SentList.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));



        tabHost.addTab(spec1);

© Stack Overflow or respective owner

Related posts about android

Related posts about android-tabhost