Skip to content
This repository was archived by the owner on Apr 30, 2020. It is now read-only.

Conversation

@swaheed2
Copy link

@swaheed2 swaheed2 commented Jan 2, 2016

This helper methods can be very useful if you want to use font awesome icons as text for the tabs.

Example:

Typeface fontAwesome = Typeface.createFromAsset(getAssets(), "fonts/fontawesome-webfont.ttf");

    for (int i = 0; i < adapter.getCount(); i++) {

        MaterialTab tab = tabHost.newTab();
        tab.setText(adapter.getIcon(i));
        tab.setTabListener(this);
        tab.setTypeFace(fontAwesome);
        tabHost.addTab(tab);


    }

This method can help you change the typeface which can be used for Font Awesome icons in my case
setTypeFace method added to MaterialTab
@felipebonezi
Copy link

Please, merge this pull request!
@neokree

@reixa00
Copy link

reixa00 commented Jun 14, 2016

This PR should be merged. Take a look please. Well documented and simple change.

Thanks both!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants