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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:42:46+00:00 2026-06-06T23:42:46+00:00

I am New Android development. In My application I have two ArrayLists. One ArrayList

  • 0

I am New Android development. In My application I have two ArrayLists.

One ArrayList contains HashTbale.
Another one contains HashTable

Now How can i set adpter and how to show in Listview image from Second ArrayList and Text From from ArrayList in ListView Row.

I am not able to get exact solution .

Please any one help in this issue.

Thanks in advance

  • 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-06T23:42:47+00:00Added an answer on June 6, 2026 at 11:42 pm

    If you want to display image and text in each row and if you are using 2 arraylist for the same then here is the solutions. Try this

    List<Integer> imageList = getImageList();  //list of drawable ids
    List<String> values = getValues();
    
    class CustomAdapter extends BaseAdapter {
    
        @Override
        public int getCount() {
            // TODO Auto-generated method stub
            return imageList.size();;
        }
    
        @Override
        public Object getItem(int position) {
            // TODO Auto-generated method stub
            return null;
        }
    
        @Override
        public long getItemId(int position) {
            // TODO Auto-generated method stub
            return position;
        }
    
        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
            // inflate the layout which contains imageview and textview which are aligned horizontally. 
            //Assuming you inflated layout and got imageView and textview from that layout
            textView.setText(values.get(position));
    
            imageView.setImageResource(imageList.get(position));
            return convertView;
        }
    
    }
    

    //Code wont work if you directly copy paste. Use the logic and change accordingly

    Instead of using 2 arraylist, my suggestion is you use HashMap. Imagepath as key and text as value.

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

Sidebar

Related Questions

I am new in Android application development, but I have programming knowledge in iOS.
I am new to android development and have a few questions. 1: Can I
I am brand new to Android development and have gotten through these two resources
I am brand new to Android development and have gotten through these two resources
I want to start android tablet application development. i have created a new avd
I am new in android development. and i have task to develop the application.
i am new in android development and i have one problem with redirect the
I'm new to Android development. I have an application that allows the user to
I am new to android application development. I need a solution for setting random
i m new to this android application development i would be very much grateful

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.