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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:23:18+00:00 2026-06-13T12:23:18+00:00

I would like to R.drawable which is in a dynamic string format currently to

  • 0

I would like to R.drawable which is in a dynamic string format currently to an integer format.How can be it done.Please guide me with a snippet on this to resolve it.Thank you.

Integer[] images={R.drawable.apple,R.drawable.mango,R.drawable.banana};
  • 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-13T12:23:19+00:00Added an answer on June 13, 2026 at 12:23 pm

    You can use this

    public int[] getIntIds(Integer[] images){
        int[] temp = new int[images.length];
        String name;
        for(int i=0; i<= images.length; i++){
            name = getResources().getResourceEntryName(images[i]);
            temp[i] = getResources().getIdentifier(name , "drawable", getPackageName());
        }
        return temp;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this question which is the same problem that I would like to
I would like to be able to use the same drawable to represent both:
Would like to parse IPv4 address from exit-addresses . Format of the file: ExitNode
I would like to know how to make the button which contains a kinda
For example if i create app like travel guide and i would like to
I am having one contact form in which I would like to add some
I've got 3 view inside a scroll view which I would like to distribute
I would like to know if it's possible to specify more than just drawable-ldpi,
I would like to achieve this specific type of radio buttons in my layout:
I have this code and would like it to appear on the page of

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.