Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to change the default tabbar's tab font on Xamarin.Android

aga913aga913 Member ✭✭✭

hi, the title pretty much describes what i want here.
simply a way to change the font of the tabs on the tabbar to another font.

Best Answers


  • suraj007suraj007 Member ✭✭✭
    Accepted Answer


    in style.xml

    ?attr/colorAccent ?attr/selectableItemBackground @style/MyCustomTabTextAppearance ?android:textColorPrimary 12sp ?android:textColorSecondary true
  • suraj007suraj007 Member ✭✭✭
    ?attr/colorAccent ?attr/selectableItemBackground @style/MyCustomTabTextAppearance ?android:textColorPrimary 12sp ?android:textColorSecondary true
  • aga913aga913 Member ✭✭✭
    edited August 2019

    Thank you very much for the fast respond.
    so you mean i should put this in styles.xml that contains a style and bind it from the Tabbar.axml right ?
    and yea i do see what do you mean its style and items
    for anyone how did not understand the code below
    this is how it should look like...

  • aga913aga913 Member ✭✭✭

    sorry to bother again but
    item name="fontFamily" AndroidAsset/MyRegularFont.ttf item
    or this:
    item name="android:fontFamily" AndroidAsset/MyRegularFont.ttf item
    and i don't know about the reference i used :/
    it's probably wrong so how do i reference to it ?
    if you have any link so i read more about it and you don't waste your time any further...

  • suraj007suraj007 Member ✭✭✭

    download fonts .ttf file which are used........

  • suraj007suraj007 Member ✭✭✭

    extract zip file and paste this file in asset folder.............

    Button button = FindViewById(Resource.Id.myButton);

    var font = Typeface.CreateFromAsset(Assets, "FontName.ttf");
    button.Typeface = font;

  • aga913aga913 Member ✭✭✭

    i meant

    here how do i implement my font i already have it in my Assets folder
    Sorry for troubling you and not being Clear enough

  • aga913aga913 Member ✭✭✭

    @suraj007 thanks a lot,
    in the last link you sent the important part says it's working in java
    "We’re setting our custom fonts in the java code. The is given below"
    and it is a bit hard for me to use java since i have ~0 experience in java
    i asked the rest of my question in another thread
    thnx again ^_^

Sign In or Register to comment.