I was looking for answers about how I can change the fonts of those tabs in that TabLayout to a custom font.
I tried this but it didnt work
Typeface hero = Typeface.createFromAsset(getContext().getAssets(),"fonts/Hero Light.otf");
textViewToConvert.setTypeface(hero);
}
}
Tap on the "Display" and then the "Font and screen zoom" Scroll down the screen up to "Screen Zoom" and "Font Style." Under the "Screen Zoom" section, you can change the font size that you wish. Under the "Font Style" section, you can choose font style from the available list to set it as the system font.
HiFont is one of the most effective font changer apps for Android. It supports various devices, from smartphones to tablets running Android. There are a lot of awesome free fonts to be downloaded on your Android device.
In your layout
<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"
style="@style/Tab"
android:layout_width="match_parent"
android:layout_height="54dp"
app:tabTextAppearance="@style/MineCustomTabText"/>
and in your style folder
<style name="MineCustomTabText" parent="TextAppearance.Design.Tab">
<item name="android:textSize">12sp</item>
<item name="android:textAllCaps">true</item>
<item name="android:fontFamily">@font/two_light_1</item>
</style>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With