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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:31:42+00:00 2026-06-04T18:31:42+00:00

I have 5 listviews which I would like to put in the same layout.

  • 0

I have 5 listviews which I would like to put in the same layout.
My idea was to use a scrollview but apparently this is not working very well.

How could i do this.

Thank you.

Here is my layout code:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_white" >


<ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:background="@null"
    android:src="@drawable/bg_mdpi" />


 <TextView
     android:id="@+id/SearchingForTextView"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:layout_alignParentLeft="true"
     android:layout_alignParentTop="true"
     android:layout_marginTop="5dp"
     android:text="Searching for: "
     android:textAppearance="?android:attr/textAppearanceSmall"
     android:textColor="#ff000000"
     android:visibility="visible" />


<TextView
    android:id="@+id/SearchingFor"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_toRightOf="@+id/SearchingForTextView"
    android:layout_marginTop="5dp"
    android:text="Word"
    android:textColor="#112ED4"
    android:textAppearance="?android:attr/textAppearanceSmall"
    android:visibility="visible" />

<TextView
    android:id="@+id/JournalsSearchTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/SearchingFor"
    android:layout_marginTop="10dp"
    android:background="#ff888888"
    android:gravity="center_horizontal"
    android:text="Journals"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="#ff000000"
    android:textStyle="bold" />


<ListView
    android:id="@+id/JournalSearchListView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/JournalsSearchTextView"
    android:layout_centerHorizontal="true"
    android:background="#D5DADE"
    android:cacheColorHint="#00000000">
</ListView>

 <TextView
    android:id="@+id/ArticlesSearchTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/JournalSearchListView"
    android:background="#ff888888"
    android:gravity="center_horizontal"
    android:text="Articles"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="#ff000000"
    android:textStyle="bold" />

 <ListView
    android:id="@+id/ArticlesIssuesSearchListView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/ArticlesSearchTextView"
    android:layout_centerHorizontal="true"
    android:background="#D5DADE"
    android:cacheColorHint="#00000000" >
</ListView>



<TextView
    android:id="@+id/AuthorsSearchTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/ArticlesIssuesSearchListView"
    android:background="#ff888888"
    android:gravity="center_horizontal"
    android:text="Authors"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="#ff000000"
    android:textStyle="bold" />



<ListView
    android:id="@+id/AuthorsSearchListView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/AuthorsSearchTextView"
    android:layout_centerHorizontal="true"
    android:background="#D5DADE"
    android:padding="1dp"
    android:cacheColorHint="#00000000">
</ListView>


<TextView
    android:id="@+id/SubmissionsSearchTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/AuthorsSearchListView"
    android:background="#ff888888"
    android:gravity="center_horizontal"
    android:text="Submissions"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="#ff000000"
    android:textStyle="bold" />

 <ListView
    android:id="@+id/SubmissionsSearchListView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/SubmissionsSearchTextView"
    android:layout_centerHorizontal="true"
    android:background="#D5DADE"
    android:cacheColorHint="#00000000">
</ListView>

  <TextView
    android:id="@+id/SpecialIssuesSearchTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:layout_alignParentRight="true"
    android:layout_below="@+id/SubmissionsSearchListView"
    android:background="#ff888888"
    android:gravity="center_horizontal"
    android:text="Special Issues"
    android:textAppearance="?android:attr/textAppearanceLarge"
    android:textColor="#ff000000"
    android:textStyle="bold" />

 <ListView
    android:id="@+id/SpecialIssuesSearchListView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/SpecialIssuesSearchTextView"
    android:layout_centerHorizontal="true"
    android:background="#D5DADE"
    android:cacheColorHint="#00000000" >
</ListView>

  • 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-04T18:31:43+00:00Added an answer on June 4, 2026 at 6:31 pm

    I got what you want finally. You want to show the search result for 5 different categories.

    I suggest you can use a ExpandableListView for this.
    Android offer an ExpandableListView which look like the following structures:

    Group A       (v)
    -----------------
      Child A1
    -----------------
      Child A2
    -----------------
      Child A3
    -----------------
    Group B       (v)
    -----------------
      Child B1
    -----------------
      Child B2
    -----------------
      Child B3
    -----------------
    Group C       (v)
    -----------------
      Child C1
    -----------------
      Child C2
    -----------------
      Child C3
    

    The usage is quite similar to the ListView. What you have to do is to write an adapter which extends BaseExpandableListAdapter.
    You can also implements custom layout for the Group view/Child view.

    You may refer these pages:

    http://about-android.blogspot.com/2010/04/steps-to-implement-expandablelistview.html

    http://www.techienjoy.com/android-expandable-list-dynamically-created-example.php

    http://android-adda.blogspot.com/2011/06/custom-expandable-listview.html

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

Sidebar

Related Questions

I have a ListView which uses a CursorAdatper as its adapter. I would like
I have an object submission which contains some informations which I would like to
I have the following rss feed which I would like to query to get
i want to create an activity, in which, i would like to have a
I have a popup menu in my listview which i would like as disabled
I have an application with a ListView ('SysListView32') control, from which I would like
I have a ListView which after populating it, will look like this: I already
I have a calendar design in which i would like to list the saved
I have a listview which I would like to fill with self created user
I have 1 activity, but would like to have multiple context menu's for different

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.