Support for TabLayout from Android Design Support library.
See original GitHub issueThank you for this amazing library.
I am having an issue with the TabLayout
widget introduced in the new Design Support Library launched by the Android team. The textviews in the tabs are not responding to the font change.
I have followed the steps from http://chrisjenx.com/calligraphy-2-0-0/. I am using v2.1.1 of your library. Am I missing something?
Issue Analytics
- State:
- Created 8 years ago
- Comments:33 (11 by maintainers)
Top Results From Across the Web
Android Design Support Library - Android Developers Blog
The Design library's TabLayout implements both fixed tabs, where the view's width is divided equally between all of the tabs, as well as ......
Read more >Android Design Support Library - Tablayout with toolbar
So the question remains, how to I make my individual fragments update the options available in the options menu of the toolbar? activity_main....
Read more >Material Design Tabs with Android Design Support Library
For creating Tabs, we use the TabLayout widget class. This is a new widget, part of the Design Support Library.
Read more >Support Library Features Guide - Android Developers
Views, dialogs, and widgets · CardView - A support library custom class for creating Material Design style display cards.
Read more >TabLayout with Android Design Support Library
TabLayout with Android Design Support Library ... Switching between different views in your app via tabs is not a new concept to material...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Used
CalligraphyTypefaceSpan
in thegetPageTitle()
didn’t work for me usingcom.android.support:design:23.2.0
. But the customView version works fine if not a little fugly. If any one is looking for code sample on how to apply a custom view with thefontPath
defined heres want I used.Below is the custom view -
res/layout/tab_text.xml
Sorry to open this thread again, I think this might be helpful
@Override public CharSequence getPageTitle(int position) { String title = mFragmentTitleList.get(position); CalligraphyTypefaceSpan typefaceSpan = new CalligraphyTypefaceSpan(TypefaceUtils.load(activity.getAssets(), “fonts/OpenSans-Semibold.ttf”)); SpannableStringBuilder s = new SpannableStringBuilder(); s.append(title); s.setSpan(typefaceSpan, 0, title.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); return SpannableString.valueOf(s); }
I am using tablayout with view pager and it worked for me.