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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:25:10+00:00 2026-05-24T05:25:10+00:00

Which method i must override, that the xml layout use to read the resources

  • 0

Which method i must override, that the xml layout use to read the resources linked with, sample:

if i had TextView within my layout:

            <TextView android:layout_width="wrap_content"
                android:layout_height="wrap_content" android:id="@+id/textview1"
                android:text="@String/text_test1"
                </TextView>

and in my Activity in onCreate, we always use setContentView:
setContentView(R.layout.sample);

—

my question is : when we use xml file as layout in activities, how the layout reads the resources like android:text="@String/text_test1, so i can for example override it, so when the layout request any String i can bind another text to it ?

—

Note : am not looking for regular way, by finding the view in the XML, and then change it properties.
am looking for abstract way to change every String requested in the resources by xml layout.

  • 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-24T05:25:11+00:00Added an answer on May 24, 2026 at 5:25 am

    To change the text you need to simply use this in your activity.

      ((TextView)findViewById(R.id.textview1)).setText("New Text");
    

    To override the entire TextView you need to create a custom textview class that extends TextView and perform your stuff there.

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

Sidebar

Related Questions

I have read in HttpServlet documentation that A subclass of HttpServlet must override at
I have a service that runs a TimerTask in a method, which must count
equals and hashCode method must be consistent, which means that when two objects are
Which method makes the most sense for importing a module in python that is
Which method do you think is the best. Use the System.IO.Packaging namespace? Use interop
Which method View() is called last in the System.Web.Mvc.Controller? Or should I override each
Which method can be used to read one line at a time from a
I just want to override the Selected method from MonoTouch.Dialog. Simple as that I
When you override a method you must keep the method's signature and can't reduce
Here's the situation. I have a base class which implements a method that accepts

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.