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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:22:31+00:00 2026-05-23T14:22:31+00:00

In my android app, I have a number of buttons in a grid (basically

  • 0

In my android app, I have a number of buttons in a grid (basically a 2-D array of components). When long pressing these components I need to display a string to the user, with each array location having different strings.

For an actual app where I am using this, please see :
RIFT Assistant : https://market.android.com/details?id=com.gopalshalu.rift.assistant
In the app, start up a soul tree .

Question

Is there a way to dynamically formulate the name of string, and get the strings value.
Something like…

Int row = 0;
String target_string_name = “”;
for (int col=0;i<1;i++)
{
    target_string_name  = “teststring_” + row + “_” + col; // we have dynamically created the name
    How do we get the actual string value here, using string name in target_string_name variable?
}

How do we get the actual string value here, using string name in target_string_name variable?

Example

String to be displayed when pressing grid location (0,0) – Hello, test string at 0,0
String to be displayed when pressing grid location (0,1) – World!.. test string at 0,1

I have a string.xml file, with the following naming convension:

<string name=’teststring_row_column’>string contents</string>

So, for the above example, the string.xml will look like:

<string name=”teststring_0_0”>Hello, test string at 0,0</string>
<string name=”teststring_0_1”>World!... test string at 0,1</string>

Thanks in advance for your time and responses.

  • 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-23T14:22:31+00:00Added an answer on May 23, 2026 at 2:22 pm

    If I understand you correctly, I believe you’re looking for getIdentifier().

    Here‘s a demonstration of its use.

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

Sidebar

Related Questions

In android app, I have display the number of buttons in number of rows
I have a simple android app that has quite a number of buttons, all
I have an android app which asks a question followed by x number of
I have an Android App with a number of activities. The wrong activity is
So, I'm developing an app and need to have two buttons pressed at the
In my android app I have used InMobi ad sdk to show banner ad's.
In my android app I have created a raw folder inside /res folder (/res/raw).
In my android app I have fragments, and one of them is very heavy
I started developing an android app that have to interact with MMS attachements, in
I am working on an android app and have to use remote database for

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.