Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7017555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:55:45+00:00 2026-05-27T22:55:45+00:00

How (if possible) could I set a custom font in a ActionBar title text(only

  • 0

How (if possible) could I set a custom font in a ActionBar title text(only – not the tab text) with a font in my assets folder? I don’t want to use the android:logo option.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:55:46+00:00Added an answer on May 27, 2026 at 10:55 pm

    I agree that this isn’t completely supported, but here’s what I did. You can use a custom view for your action bar (it will display between your icon and your action items). I’m using a custom view and I have the native title disabled. All of my activities inherit from a single activity, which has this code in onCreate:

    this.getActionBar().setDisplayShowCustomEnabled(true);
    this.getActionBar().setDisplayShowTitleEnabled(false);
    
    LayoutInflater inflator = LayoutInflater.from(this);
    View v = inflator.inflate(R.layout.titleview, null);
    
    //if you need to customize anything else about the text, do it here.
    //I'm using a custom TextView with a custom font in my layout xml so all I need to do is set title
    ((TextView)v.findViewById(R.id.title)).setText(this.getTitle());
    
    //assign the view to the actionbar
    this.getActionBar().setCustomView(v);
    

    And my layout xml (R.layout.titleview in the code above) looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/transparent" >
    
    <com.your.package.CustomTextView
            android:id="@+id/title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_marginLeft="10dp"
                android:textSize="20dp"
                android:maxLines="1"
                android:ellipsize="end"
                android:text="" />
    </RelativeLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What could be the possible causes for the following exception? System.PlatformNotSupportedException: 'ResourcePool' is not
I could definitely accomplish what I want with a custom handler, but I was
I could only find if one wants to display scroll bar or not using
I was reading http://www.orchardproject.net/docs/Creating-1-n-and-n-n-relations.ashx and could not get the idea, if it is possible
In other words could it be possible to create assembly, which does not even
Not sure how to word this. I've set up a custom post type in
I have a set of entities where they could possibly be set as deleted
Possible Duplicate: Could you explain STA and MTA? All ThreadPool threads are in the
Possible Duplicate: Could anyone explain these undefined behaviors (i = i++ + ++i ,
One possible solution could be simple HTTP get or post request, but that wouldn't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.