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

setTypeFace method for MaterialTab host#75

Open
swaheed2 wants to merge 2 commits into
neokree:masterfrom
swaheed2:master
Open

setTypeFace method for MaterialTab host#75
swaheed2 wants to merge 2 commits into
neokree:masterfrom
swaheed2:master

Conversation

@swaheed2

@swaheed2 swaheed2 commented Jan 2, 2016

Copy link
Copy Markdown

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
Copy Markdown

Please, merge this pull request!
@neokree

@reixa00

reixa00 commented Jun 14, 2016

Copy link
Copy Markdown

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