Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change tab text #40

Closed
JSONValidator opened this issue Jun 25, 2015 · 4 comments
Closed

Change tab text #40

JSONValidator opened this issue Jun 25, 2015 · 4 comments
Labels

Comments

@JSONValidator
Copy link

Please tell me
How can I change title of tab?

adapter = new FragmentPagerItemAdapter(getSupportFragmentManager(), FragmentPagerItems.with(AnketaActivity.this)
                .add("tab1", AnketaFragment1.class)
                .add("tab2", AnketaFragment2.class)
                .add("tab3", AnketaFragment3.class)
                .create());

I want change "tab1" to "tab1 new"

@ogaclejapan
Copy link
Owner

Hi, @mynickisalreadytaken

You want to change before you set the ViewPager#setAdapter(..)?
Or you want to change after the tab is displayed?

Steps to change is different depending on the situation.

@JSONValidator
Copy link
Author

after the tab is displayed

@ogaclejapan
Copy link
Owner

Okay you can easily display on the changes:

((TextView)viewPagerTab.getTabAt(0)).setText("tab1 new");

Solved ?

@JSONValidator
Copy link
Author

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants