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

Not working on TabLayout #197

Open
neutt22 opened this issue Mar 22, 2017 · 0 comments
Open

Not working on TabLayout #197

neutt22 opened this issue Mar 22, 2017 · 0 comments

Comments

@neutt22
Copy link

neutt22 commented Mar 22, 2017

Here's my current code:

` @OverRide
public CharSequence getPageTitle(int position) {
Drawable drawable = new IconDrawable(context, FontAwesomeIcons.fa_android);

    drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());

    SpannableString spannableString = new SpannableString(" " + TAB_TITLES[position]);
    ImageSpan imageSpan = new ImageSpan(drawable, ImageSpan.ALIGN_BOTTOM);

    spannableString.setSpan(imageSpan, 0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
    return spannableString;

}`

Only text are being shown. I'm using support TabLayout.

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

1 participant