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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:17:30+00:00 2026-05-23T08:17:30+00:00

I am creating a ListView where I want to insert images and text (both

  • 0

I am creating a ListView where I want to insert images and text (both align horizontal).
The code I have written to create ListView:

private ListView lv1;
    private String lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","Android","iPhone","BlackBerry","AndroidPeople","Android","iPhone","BlackBerry","AndroidPeople"};
    @Override
    public void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        setContentView(R.layout.contact_activity);
        lv1=(ListView)findViewById(R.id.ListView01);    
        lv1.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1 , lv_arr));
        lv1.setOnItemClickListener(new OnItemClickListener() {
             public void onItemClick(AdapterView<?> parent, View view,
                        int position, long id) {
                      // When clicked, show a toast with the TextView text
                      /*Toast.makeText(getApplicationContext(), ((TextView) view).getText(),
                          Toast.LENGTH_SHORT).show();*/
                      String selecteditem = lv_arr[position];
                      Intent myIntent = new Intent(view.getContext(), ContactInfo.class);
                      myIntent.putExtra("item", selecteditem);
                      startActivity(myIntent);
                    }
                  });
        }

Here in my case I insert only string but what I want is to insert image and string together in the list. Please suggest me how I can do it.

  • 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-23T08:17:31+00:00Added an answer on May 23, 2026 at 8:17 am

    http://appfulcrum.com/?p=311

    http://android-codes-examples.blogspot.com/2011/03/multiple-listview-and-custom-listview.html

    http://www.anddev.org/view-layout-resource-problems-f27/dividers-for-imageview-and-textviews-in-expandable-listview-t52970.html

    http://androidgenuine.com/?tag=text-and-image-on-a-listview-android

    http://devblogs.net/2011/01/04/multicolumn-listview-with-image-icon/

    http://www.curious-creature.org/2009/02/22/android-layout-tricks-1/

    http://w2davids.wordpress.com/android-listview-with-iconsimages-and-sharks-with-lasers/

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

Sidebar

Related Questions

Creating a JApplet I have 2 Text Fields, a button and a Text Area.
I currently have a custom listview with two rows of text in each item,
I am creating an android application in which I have to insert an image
I am creating a ListView dynamically and want to add two TextViews in a
am working in windows application with c#.Am creating the listview items dynamically..i want to
I have the following ListView : and I'm creating a List<string> of the items
I am creating a ListView . I have created two XML files, in the
I have a method that I want to use to filter a listview. I
I am creating a customized listview header that has the header text but also
My question is;I have a listview which can be filled through a code.I put

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.