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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:12:20+00:00 2026-06-03T09:12:20+00:00

Ok I have not done a very good job explaining my problem so here

  • 0

Ok I have not done a very good job explaining my problem so here goes revised a few times.

I have a Survey, The Survey Produces an Integer Number. I Convert this Number into a String File name Which relates to a Preset String stored in my resources. Based on the choices made on the questions a different string is required at the end.

This code generates the desired command line; R.string.c####

    int Q1 = question1.getmCounter();
int Q2 = question2.getmCounter();
int Q3 = question3.getmCounter();
int Q4 = question4.getmCounter();

int qTotal = Q1 + Q2 + Q3 + Q4;
String Test5 = "R.string.c" + qTotal;

And This code is inside onCreate to generate the content for the TextView.

        textOut = (TextView) findViewById(R.id.ChmpNametxt);
    textOut.setText(Test5);

Now my concept was that it would read Test5 as “R.string.c####” and load the desired string. It does not do this and i would like to know how i can get the contents of Test5 into a commandline.

Hope someon can help me im malting..

Thanks in Advance

-Chris

  • 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-03T09:12:22+00:00Added an answer on June 3, 2026 at 9:12 am

    You got the correct answer here already: Creating Strings than can be used as Filepath – Eclipse / Android

    In your case:

    String stringId = "c" + qTotal; //note: not the same as what you did with your Test5
    int resId = getResources().getIdentifier(stringId, "string", getPackageName());
    textOut.setText(resId);
    

    Or are we misunderstandig your use of the word “commandline”?

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

Sidebar

Related Questions

I hope I am not missing something very simple here. I have done a
everyone! I'm not very good with JS/JQuery, so I need some help here... I
I have not done any animation stuff with iphone development so far. Can anybody
I have not done any large game development projects, only messed around with little
I would appreciate some help with something I working on and have not done
I want to do a simple drag-drop using jQuery. I have not done anything
I have not worked with parameters in ADO.Net very much. I'm writing a custom
I have not used jquery much yet and not very familiar with it. Trying
I'm not very good in SQL stuff, so I hope someone can explain this
I have NOT done much of web-developing and I would like to learn about

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.