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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:57:40+00:00 2026-06-05T07:57:40+00:00

Here i am using scrollview in my linearlayout.But i want to include another listview

  • 0

Here i am using scrollview in my linearlayout.But i want to include another listview inside my scrollview linearlayout.

Scrollview supports ony one child.I know that inside scrollview listview is not working.But is there any other option to use listview.I want to scroll all the content.

<?xml version="1.0" encoding="utf-8"?>
    <ScrollView
        android:id="@+id/widget54"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        xmlns:android="http://schemas.android.com/apk/res/android"
        >
        <LinearLayout
            android:layout_width="310px"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            >
            <Button
                android:id="@+id/button1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button 1"
                />
            <Button
                android:id="@+id/button2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button 2"
                />
            <Button
                android:id="@+id/button3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button 3"
                />
            <EditText
                android:id="@+id/txt"
                android:layout_width="fill_parent"
                android:layout_height="300px"
                />
            <Button
                android:id="@+id/button4"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="Button 4"
                />

        </LinearLayout>
    </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-05T07:57:41+00:00Added an answer on June 5, 2026 at 7:57 am

    ListView inside ScrollView is pretty sure not working.

    The only method i can think of, is you have only one listview in the interface, and, create a custom adapter for it:

    public class HeaderAdapter{
        private Adapter mAdapter; // this adapter is the adapter that you will normally have, for your listview
    
        getViewTypeCount(){
            return mAdapter.getViewTypeCount() + 1;
        }
    
        getView(int pos, View convertView){
            // Handle only the first position, othervise, let mAdapter return
            if (pos!=0) return mAdapter.getView(pos-1, convertView);
    
            // 
            View v = LayoutInflater.inflate(R.layout.other_linear_layout);
            // Bind the v if necessary
    
            return v;
        }
    }
    

    Above is just an example, idea is you treat the rest of the content (linearlayouts, buttons, edittext etc) as the “Header” row of the adapter.

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

Sidebar

Related Questions

I want to show two scrollView in one LinearLayout or RelativeLayout. Which property should
This question is an extension to the one raised here: Using factory_girl in Rails
I am attempting to follow along to this tut: HERE but using a sprite
I want to place a DataGrid inside a HeaderedContentControl but the the DataGrid does
I add One ScrollView in that i put image when i resize image using
i am trying to create tablelayout inside scrollview but it gives me erorr i
Here's the scenario conceptually (excluding linearlayouts) ScrollView Button Checkboxes Spinner ListView (full-size, non-scrolling) AdMob
I have a problem about RelativeLayout,i dunno know how to add a scrollview,i want
EDIT: The plugin in question is located here . PHP beginner here using a
why are we using here 5 parameters for stringWithFormat : return [NSString stringWithFormat:NSLocalizedString(@LatLongFormat, @LatLongFormat),

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.