I googled this but couldn't find any solution please help. I have created a tabbar view having 3 tabs with Tabhost and set its title with TabSpec like this :
TabSpec tbhome = tabHost.newTabSpec("Home");
tbhome.setIndicator("Selected Topic");
I have 2 buttons in my another tab which is next to above tab. Now what I want is, if I click a button in this tab the title for this button must be set to the title of my home tab. That is in above code "Selected Topic " must be set to my button's title.
Thanks.
first you get the button and make it final then on click set its text
        final Button bX = (Button) findViewById(R.id.bXX);
        bX.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                    bX.setText("Selected Topic ");
            }
        });
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With