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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:27:17+00:00 2026-05-21T17:27:17+00:00

I am looking for any way by which I can place android listView with

  • 0

I am looking for any way by which I can place android listView with TextView and another horizontal listView corresponding to that listView.

Actually I’m having a List of items and shops corresponding to that item I have sub categories.

And also a shop can have multiple sub categories like it,s different sub categories(child).

The situation to display is just like,

…………………………………………

Eat(TEXT VIew)

Image Image Image (multiple categories in that item) …..

Name Name Name (multiple categories in that item)

……………………………………………………

  • 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-21T17:27:17+00:00Added an answer on May 21, 2026 at 5:27 pm

    Use an ArrayAdaptor : look custom ListView on google : (first result) http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/

    Basically you need to design the layout of your sublist in XML, then design the layout of your main ListView in XML.

    I think you whould use wrap_content for your sublist, width : fill_parent for the main list and height : wrap_content for the main list.
    Then you need two classes to hold your required data of each item (one for the main list containing one of your sublist).

    Then you create ArrayList and ArrayList (stored in each MyMainItem).
    Then you’ll need to create two class extenting ArrayAdaptor :
    MainAdapter extends ArrayAdaptor and SecondaryAdapter

    In each of your ArrayAdapter you’ll need to store the list of items and override the constructor like so :

    private ArrayList<MyObj> items = new ArrayList<MyObj>();
    
    
        public ArticlesAdapter(Context context, int textViewResourceId,
                ArrayList<MyObj> items) {
            super(context, textViewResourceId, items);
            this.items = items;
        }
    

    In each adaptor, you’ll have to override the method

    @Override
    public View getView(int position, View convertView, ViewGroup parent) 
    

    like shown in the tutorial
    But don’t forget in your MainAdapter to call the setAdaptor() on the subListView.
    Be careful with the getView method : you are highly to receive a null object, so make sure to test it to avoid NullPointerException

    Hope I helped you. This is worth a Bounty 🙂

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

Sidebar

Related Questions

I'm looking for any way that I can improve the selector performance of a
I'm developing a todo list application. I'm looking for any way to alert the
Is there any way to achieve function overloading in C? I am looking at
We're looking for a way to log any call to stored procedures in Oracle,
I'm looking for a way to visually mark or tag a window (any OS)
I'm looking for a plugin or way to simply go from any namespace, type,
In any language really, im looking for a simple (very simple) way to control
Is there any scripting library for Audacity? Specifically, I'm looking for a way to
I am looking for any strategies people use when implementing server applications that service
I'm looking for a voting system that we can implement at work amongst our

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.