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 8141645
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:34:48+00:00 2026-06-06T12:34:48+00:00

I want to change the app typeface and I can’t: AndroidManifest.xml … <application android:icon=@drawable/ic_launcher

  • 0

I want to change the app typeface and I can’t:

AndroidManifest.xml

...
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" 
        android:theme="@style/CustomTheme"
        >
...

style.xml

....

    <style name="CustomTheme">
        <item name="android:typeface">stheiti.ttf</item>
    </style>
....

But I get an error:

error: Error: String types not allowed (at ‘android:typeface’ with
value ‘stheiti.ttf’).

But I have a rootAPP/assets/stheiti.ttf

I do not understand why get that error, I searched in many sites the solution but i couldn’t found any with same problem

Thanks in advance! :=)

  • 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-06-06T12:34:50+00:00Added an answer on June 6, 2026 at 12:34 pm

    you can set custom font in text view like

    TextView txt = (TextView) findViewById(R.id.custom_font);
    Typeface font = Typeface.createFromAsset(getAssets(), "stheiti.ttf");
    txt.setTypeface(font);
    

    If you want to implement custom font in whole application then you can create your custom view and set your font at the initialize of that view.

    public class MyTextView extends TextView {
    
    public MyTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        init();
    }
    
    public MyTextView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }
    
    public MyTextView(Context context) {
        super(context);
        init();
    }
    
    public void init() {
    
        Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "stheiti.ttf");
        setTypeface(tf ,1);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to change my radio button text in android app with a value
How can I change *.EXEs icons from c# code (not my main app icon
I am creating a simle application on iphone.I want to change iphone app to
I want to change the look of my Android app's preference screen to white
I want to change the style of a button in an android app. here
I want to change the name which is displayed below the app icon on
In production box i want to change the web.xml in a J2EE web application
I want to change the locale in my android app so I used the
I want to change the location where my application looks for the app.config file.
I want to change my app language in my app because android languages don'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.