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

  • Home
  • SEARCH
  • 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 8251749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:20:19+00:00 2026-06-08T00:20:19+00:00

//I am setting different TextView with various content as text what I am doing

  • 0

//I am setting different TextView with various content as text what I am doing is to set the typeface for all textview. custom font is also displaying fine.

((TextView) findViewById    (R.id.tutor_ps_tv_home))        .setTypeface(mFace);
((TextView) findViewById    (R.id.tutor_ps_tv_plus))        .setTypeface(mFace);
((TextView) findViewById    (R.id.tutor_ps_tv_settings))    .setTypeface(mFace);
((TextView) findViewById    (R.id.tutor_ps_tv_undo))        .setTypeface(mFace);
((TextView) findViewById    (R.id.tutor_ps_tv_cam))         .setTypeface(mFace);
((TextView) findViewById    (R.id.tutor_ps_tv_share))       .setTypeface(mFace);

//Is it possible to set only one id for all text view to change my typeface like this below.

 android:id="@+id/all_textview"
 android:id="@id/all_textview"
 android:id="@id/all_textview"
 android:id="@id/all_textview"

//and I will set in my activity as

 ((TextView) findViewById   (R.id.all_textview))        .setTypeface(mFace);

// did any one know any better sol for this.

Note: I just want to change the typeface not any otherthing/use with the textview.

  • 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-08T00:20:20+00:00Added an answer on June 8, 2026 at 12:20 am

    Is it possible to set only one id for all text view to change my typeface like this below.

    No. findViewById() will still return one TextView — it just will be a random one out of those you gave the same name to.

    There are examples floating around StackOverflow and elsewhere of iterating over the children of your content view, finding those that meet your criteria (e.g., are TextViews) and changing their Typeface.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an iframe. I am setting the content of the iframe (different domain
Is it possible to set multiple styles for different pieces of text inside a
I am setting different text to a textblock depending on what control has been
I am setting two values based on two different conditions inside for each. Is
I'm setting up a program that has three different windows. I'm just using ..
Can we set the build settings for different targets in the project build settings
When I tested the font size with different density settings using the Eclipse Emulator,
How do you go about setting different icons for the different file types handled
Reporting services seems to use a ReportColor object for setting different colours on a
How do I factor code setting many different fields in a Java object? I

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.