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

The Archive Base Latest Questions

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

I have currently have the same code from the android list view tutorial. I

  • 0

I have currently have the same code from the android list view tutorial. I want to use the images saved in my drawable resource folder and assign each individual image to a specific row in the listview.

I have tried to put an imageview in the xml and this resulted in only the use of the same image for all rows in the list view but I need to use a different image for each row.

I feel I need to create an array of these images and then add them to the listview using the .java file associated with the listview. If anyone can help, it would be much appreciated, thanks.

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

    First, as Mr. Roth suggests, you need a custom adapter. Here is an excerpt from one of my books that goes through that process.

    With respect to:

    and assign each individual image to a specific row in the listview

    That is an unusual requirement. If the list will be fairly fixed, you could create an array of the resource IDs (R.drawable.foo) and build your custom ArrayAdapter around it.

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

Sidebar

Related Questions

Have written Geolocation API code for android and iphone. Take reference from http://dev.w3.org/geo/api/spec-source.html .
I currently use AudioRecord to record audio in from the mic of an Android
I have a list view which is populated from a SQL database. I am
I currently have an Android ListView class that displays a list of about 20
I have a domain (read) and reporting (write) database on the same machine. Currently,
I'm currently making a SMS Application in Android, the following is a code snippet
I have a small Android app and currently I am firing a sql statement
I have a requirement to play YouTube video content from within an Android application
I have implement FragmentPagerAdapter in my app but it show only a same list
I've created custom ToggleButtons in Android and since all buttons inherit from the same

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.