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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:00:47+00:00 2026-05-29T21:00:47+00:00

I am displaying an image in my ListView . I stored the image in

  • 0

I am displaying an image in my ListView. I stored the image in my drawable folder R.drawable.image. Eveything is working great

AddObjectToList(R.drawable.image)

Howver now I decided to sore the location in my sqllite db as a string “R.drawable.image“. I need to parse it into a integer so I did this:

    AddObjectToList(Integer.parseInt(imageelist3.get(i).toString()

Getting this error

ComponentInfo{myproject}: java.lang.NumberFormatException: unable to parse 'R.drawable.image' as integer

Any idea how to resolve?

  • 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-29T21:00:51+00:00Added an answer on May 29, 2026 at 9:00 pm

    First of all, you have to understand the meaning of R.drawable.image

    Here R is a class R of auto-generated java file from android application,
    which contains other class class drawable in that image is a int variable.

    Its a int value and you are storing it as string then converted it in int which is wrong.

    Just store int values of R.drawable.image.

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

Sidebar

Related Questions

i am working on displaying an image and placing an icon on top of
I have a listview with a checkbox, an image and a text field. Now
I have developed a listview,listview displaying image and text.1st have to download image and
I am displaying a listview with a text view and image view. Image view
This is a very common scenario: displaying images in a ListView which have to
I am displaying images and text to a listview using a custom adapter, when
I am displaying image by setting the source of an Image element directly to
I'm having trouble with displaying image from db. I think that method for saving
I'm displaying an image like this: <img src='counter.asp'> counter.asp is doing a hit-counter do
I am displaying an image in tableview cell (Image name saved in a plist).

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.