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

setTypeFace method for MaterialTab host #75

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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