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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:52:31+00:00 2026-06-01T14:52:31+00:00

I want to find out the integer value associated to a string into the

  • 0

I want to find out the integer value associated to a string into the R.string file, from the TextView control that displays it.

So, I have a TextView called MyTextView and I associated it’s string as this

MyTextView.setText(R.string.MyString);

Now, what I want is to create some function that gives me the string ID of MyTextView, something like GetStringId(MyTextView). Maybe the TextView package already has this implemented and I cannot find it.

Thanks for your help

  • 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-01T14:52:32+00:00Added an answer on June 1, 2026 at 2:52 pm

    To add multiple translations to your application, you should use the “language-qualified-resources”, as explained on the Android Docs.

    Basically, you add your strings for the fallback-language (which is often English), to your res/values/strings.xml-file.

    Any other translations (e.g. for Spanish) go into their language-qualified-resource directory with the given language-qualifier (specified in ISO 639-1). For Spanish, this would be res/values-es/strings.xml.

    Android then checks the current device-language, searches for any translations with the corresponding language-qualifier, and automatically uses the strings specified in that file. If it can’t find any folder with a corresponding language-qualifier, it uses the one without a qualifier (e.g. the “fallback”-language).

    This is a service from Android, you simply have to put the corresponding translations in the corresponding language-qualified folders and Android will do the rest for you.

    Also see this older question: internationalisation in android

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

Sidebar

Related Questions

I have a stack which contains some integer data. I want to find out
I want to find out which tables have been modified in the last hour
Say that I have an integer-indexed array of length 400, and I want to
i want to find out a log10 of an integer in python and i
I want to find out all the subdomains of a given domain. I found
I want to find out if length property for Java arrays is an int/long
I want to find out the time in unix time (ie seconds since the
I want to find out whether a certificate's private key is stored in a
I want to find out the following: given a date ( datetime object), what
I WANT to find out if a there is a way to check if

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.