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

Tab title having both text and icon? #18

Open
curioustechizen opened this issue Jun 13, 2013 · 2 comments
Open

Tab title having both text and icon? #18

curioustechizen opened this issue Jun 13, 2013 · 2 comments

Comments

@curioustechizen
Copy link

In the notifyDatasetChanged() method of class PagerSlidingTabStrip, I see this code:

for (int i = 0; i < tabCount; i++) {

    if (pager.getAdapter() instanceof IconTabProvider) {
        addIconTab(i, ((IconTabProvider) pager.getAdapter()).getPageIconResId(i));
    } else {
        addTextTab(i, pager.getAdapter().getPageTitle(i).toString());
    }

}

What this leads me to believe is that the tabs can either have a text title, or an icon, but not both. Is this assumption correct? If so, would you consider allowing a tab to have both an icon and a text as a feature request?

@mpost
Copy link

mpost commented Jan 18, 2014

You can set a View as the tab which could contain both text and icon.

@Benjamin-Dobell
Copy link

@mpost Yes, that is one of many possibilities my fork enables support for. Checkout https://play.google.com/store/apps/details?id=com.playup.android&hl=en for an example of just how flexible this functionality is.

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

No branches or pull requests

4 participants