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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:30:28+00:00 2026-06-06T10:30:28+00:00

I am still unclear about which adapter to use in a situation that doesn’t

  • 0

I am still unclear about which adapter to use in a situation that doesn’t require the basic, SimpleAdapter. There are BaseAdapters, ArrayAdapters, CustomAdapters, etc.

I would like to make a ListView with a simple layout like seen in the comment section in the Google PlayStore. A TextView on one side, and an image that pops up a context menu of some sort.

What adapter would I use for this that would work best?

  • 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-06T10:30:31+00:00Added an answer on June 6, 2026 at 10:30 am

    In your case it is easier to use a SimpleAdapter. Just provide your custom layout and connect the data with the widgets’ id. Something similar to this:

    List<HashMap<String,String>> datalist = new ArrayList<HashMap<String,String>>();
    
    HashMap<String, String> map = new HashMap<String,String>();
    map.put("text", "some text");
    map.put("image",Integer.toString( R.drawable.your_image_to_popup_a_menu ));
    datalist.add( map );
    
    String[] from = { "text","image" };
    int[] to = { R.id.txt,R.id.img };
    
    SimpleAdapter adapter = new SimpleAdapter( this, datalist, R.layout.your_layout, from, to);
    

    Do not forget to identify the layout’s TextView and ImageView as "@+id/txt" and "@+id/img" respectively.

    (If your image is always the same, just set it in the layout and forget linking the R.id.img part)

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

Sidebar

Related Questions

Keep going around circles, but I am still unclear about this. Have a feeling
I am reading a manual about innodb transactions but still, there is lots of
There's a few questions on stack overflow on this topic but I'm still unclear:
After reading some tutorials I am still unclear on some points about memory management
I have looked at most threads here about Doubly linked lists but still unclear
I'm a beginner in programming and I've read several tutorials. I'm still unclear about
I still have some unclear understand about release and autorelease. What are the difference
After reading much of the documentation, I'm still unclear about proactive caching being set
I read some tutorials concerning Makefiles but for me it is still unclear for
Some of the concepts and designs of the SIMT architecture are still unclear to

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.