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

  • Home
  • SEARCH
  • 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 7933369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:18:42+00:00 2026-06-03T21:18:42+00:00

I want to create a page that has 3 lists and 3 headers but

  • 0

I want to create a page that has 3 lists and 3 headers but I don’t want to scroll them independently, I want the whole page to scroll. Does anyone know how I could achieve this?

Essentially I want it to look like this:

header
smlheader
list
smlheader
list
smlheader
list

With this code I’ve tried to achieve it but it’s not that good.

<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"

<TableLayout 
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@color/white">

   <include layout="@layout/header" />
   <include layout="@layout/redcell" />

   <TableRow

       android:id="@+id/tableRow1"
       android:layout_width="wrap_content"
       android:layout_height="60dp" >


      <TextView

        android:id="@+id/fixtures_text"
        android:layout_width="match_parent"
        android:layout_height="60dp"

        android:gravity="center"
        android:text="@string/leagues"
        android:textColor="@color/white"
        android:textSize="25dp"
        android:textStyle="bold"/>




   </TableRow>

   <include layout="@layout/redcell" />

   <TableRow
       android:id="@+id/tableRow2"
       android:layout_width="wrap_content"
       android:layout_height="60dp" >


      <TextView

        android:id="@+id/results_text"
        android:layout_width="match_parent"
        android:layout_height="60dp"

        android:gravity="center"
        android:text="@string/leagues"
        android:textColor="@color/white"
        android:textSize="25dp"
        android:textStyle="bold"/>

   </TableRow>

    <include layout="@layout/redcell" />


    <ListView
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
   />

</TableLayout>
<ScrollView/>
  • 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-03T21:18:44+00:00Added an answer on June 3, 2026 at 9:18 pm

    I would try CommonsWare MergeAdapter as pointed to by Rajesh. It sounds like exactly what you need.

    It will take multiple views (including listviews) and put them together, then you set the merge adapter to a listview and presto, you have several listviews in one.

    Quoting from the docs for it:

    MergeAdapter accepts a mix of Adapters and Views and presents them as one contiguous whole to whatever ListView it is poured into. This is good for cases where you have multiple data sources, or if you have a handful of ordinary Views to mix in with lists of data, or the like.

    Simply create a MergeAdapter and call addAdapter(), addView(), or addViews() (latter accepting a List), then attach your adapter to the ListView.

    EDIT

    1) Download the .jar from here
    2) Download the .jar for CWAC SackOfViewsAdapter as the MergeAdapter requires it.
    2) Create a directory in your project called “libs” (on the same level as src & res)
    3) place both of the .jar files in that folder (Eclipse should automatically take things from there as far as setting it up to be included in the build)
    4) Use the MergeAdapter per the instructions from the first link in my original response.

    Pseudo-code example:

    myMergeAdapter = new MergeAdapter();
    myMergeAdapter.addView(HeaderView);
    myMergeAdapter.addView(SmallHeaderView1);
    myMergeAdapter.addAdapter(listAdapter1);
    myMergeAdapter.addView(SmallHeaderView2);
    myMergeAdapter.addAdapter(listAdapter2);
    myMergeAdapter.addView(SmallHeaderView3);
    myMergeAdapter.addAdapter(listAdapter3);
    
    setListAdapter(myMergeAdapter);
    

    EDIT 2

    Adding your header which is a complete layout:

    View Header = getLayoutInflater.inflate(R.layout.red_cell);
    myMergeAdapter.addView(Header);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I want to Create a home page that has updating blog entries. So
I want to create a php page on the website (CMS Wordpress), but I
My goal is to present a jsf page that has Create, Retrieve and Update
I have an html page that has particular text that I want to parse
I am associated with a non-profit that has asked me to help them create
I want to create settings page for my android application.In the settings page is
I want to create a web page where a registered user picks a number
I want to create an index page with a couple of results for each
I want to create a Dynamic aspx Page in current solution through code-behind..forexample i
I want to create a Thread safe JSP page. It is possible in Servlet

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.