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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:41:46+00:00 2026-05-26T06:41:46+00:00

I have one layout. This layout contain 3 list view with the height of

  • 0

I have one layout. This layout contain 3 list view with the height of wrap_content data in the Listview are not fix. When Listview have a liitel huge data at that time the data goes to underneath and the data can not able to see,so i want to scroll the view with all three Listview how it is possible.

Any one have an idea about this ?

This is my view which contain 3 Listview, now it’s with the less data but when the data will make huge at that time the last Listview have a problem to view. I want to scroll the grey colored view…

enter image description here

  • 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-26T06:41:46+00:00Added an answer on May 26, 2026 at 6:41 am

    Use linear layout instead of listview in your xml file.
    This is your xml file.

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView android:id="@+id/scr" android:layout_height="fill_parent"
        android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
        <LinearLayout android:layout_width="fill_parent"
            android:id="@+id/r2" android:orientation="vertical"
            android:layout_height="fill_parent" android:paddingTop="100dip"
            android:paddingBottom="100dip">
            <LinearLayout android:layout_width="fill_parent"
                android:id="@+id/l1" android:orientation="vertical"
                android:layout_height="wrap_content" android:layout_marginTop="10dip"
                android:background="#00B2EE">
            </LinearLayout>
            <LinearLayout android:layout_width="fill_parent"
                android:id="@+id/l2" android:orientation="vertical"
                android:layout_height="wrap_content" android:layout_marginTop="10dip"
                android:background="#00EE76">
    
            </LinearLayout>
            <LinearLayout android:layout_width="fill_parent"
                android:id="@+id/l3" android:orientation="vertical"
                android:layout_height="wrap_content" android:layout_marginTop="10dip"
                android:background="#7171C6">
            </LinearLayout>
        </LinearLayout>
    </ScrollView>
    

    and put another xml which will be inflated by list.

    this is your main activity class.

    package com.list.add;
    
    import java.util.ArrayList;
    import java.util.List;
    import android.app.Activity;
    import android.os.Bundle;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.LinearLayout;
    import android.widget.ScrollView;
    import android.widget.TextView;
    
    public class NewlistActivity extends Activity {
        /** Called when the activity is first created. */
        LinearLayout l1,l2,l3;
        ScrollView scrollView;
        ViewGroup contentView;
        List<String> list = new ArrayList<String>();
        List<String> list1 = new ArrayList<String>();
        List<String> list2 = new ArrayList<String>();
    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            l1 = (LinearLayout) findViewById(R.id.l1);
            l2 = (LinearLayout) findViewById(R.id.l2);
            l3 = (LinearLayout) findViewById(R.id.l3);
            scrollView = (ScrollView) findViewById(R.id.scr);
            contentView = (ViewGroup) findViewById(R.id.r2);
            scrollView.setOnTouchListener(new ScrollPager(scrollView, contentView));
            scrollView.post(new Runnable() {
                public void run() {
                    scrollView.scrollTo(0, contentView.getPaddingTop());
                }
            });
            list.add("Parth");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Parth");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Shah");
            list.add("Parth");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Parth");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Chirag");
            list.add("Shah");
    
            list1.add("Parth");
            list1.add("Parth");
            list1.add("Parth");
            list1.add("Parth");
            list1.add("Parth");
            list1.add("Parth");
    
            list2.add("Kalpesh");
            list2.add("Kalpesh");
            list2.add("Kalpesh");
            list2.add("Kalpesh");
            list2.add("Kalpesh");
            list2.add("Kalpesh");
            list2.add("Kalpesh");
            System.out.println(list);
            System.out.println(list1);
            System.out.println(list2);
            for (int i=0; i<list.size(); i++) 
            {
            LayoutInflater inflater = getLayoutInflater();
            View vi = inflater.inflate(R.layout.raw, null);
            TextView tv = (TextView) vi.findViewById(R.id.textView1);
            tv.setText(list.get(i));
            l1.addView(vi);
            }
            for (int i=0; i<list1.size(); i++) 
            {
            LayoutInflater inflater = getLayoutInflater();
            View vi = inflater.inflate(R.layout.raw, null);
            TextView tv = (TextView) vi.findViewById(R.id.textView1);
            tv.setText(list1.get(i));
            l2.addView(vi);
            }
            for (int i=0; i<list2.size(); i++) 
            {
            LayoutInflater inflater = getLayoutInflater();
            View vi = inflater.inflate(R.layout.raw, null);
            TextView tv = (TextView) vi.findViewById(R.id.textView1);
            tv.setText(list2.get(i));
            l3.addView(vi);
            }
        }
    
    }
    

    and make one scroller class like this:

    public class ScrollPager implements OnTouchListener
    public ScrollPager(ScrollView aScrollView, ViewGroup aContentView)
        {
            mScrollView = aScrollView;
            mContentView = aContentView;
            scroller = new Scroller(mScrollView.getContext(), new OvershootInterpolator());
            task = new Runnable()
            {
                public void run()
                {
                    scroller.computeScrollOffset();
                    mScrollView.scrollTo(0, scroller.getCurrY());
    
                    if (!scroller.isFinished())
                    {
                        mScrollView.post(this);
                    }
                }
            };
        }
    public boolean onTouch(View v, MotionEvent event)
        {
            // Stop scrolling calculation.
            scroller.forceFinished(true);
            // Stop scrolling animation.
            mScrollView.removeCallbacks(task);
    
            if (event.getAction() == MotionEvent.ACTION_UP)
            {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created one listview, in this each row contain check box and the
I have a list view full of items that contain multiple widgets each such
I have a footer view in the list view which contain a button Search
I have a doubt in layouts.I have designed one layout using group layout using
I have the following layout defined for one of my Activities: <?xml version=1.0 encoding=utf-8?>
I have a JFrame with null layout and two one character JLabels on the
I have a layout that is working, but it has one very annoying problem..
I have one std::list<> container and these threads: One writer thread which adds elements
I have a ListView with a custom view rendered by an adapter. It contains
I have: One MyListActivity class extends ListActivity setContentView(R.layout.mylist) ; Two xml files: mylist.xml and

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.