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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:12:37+00:00 2026-06-17T13:12:37+00:00

This is a sample XML i’ve written. I’m trying to make a vertically aligned

  • 0

This is a sample XML i’ve written. I’m trying to make a vertically aligned list of buttons, and 2 more columns of such. So there will be 3 columns in total. Each column will be vertically scrollable. How do you add more columns and make them individually scrollable?

I’ve searched and tried several other variations; the closest I could get to is with the tablelayout, but vertical scrolling seemed impossible with that!

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

<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:id="@+id/table" 
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:stretchColumns="*"> 

                <Button 
                    android:id="@+id/button1"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/button1"/>

                <Button
                    android:id="@+id/button2"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/button2"/>
                <Button
                     android:id="@+id/button3"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/button3"/>

</TableLayout>
  • 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-17T13:12:38+00:00Added an answer on June 17, 2026 at 1:12 pm

    You could use one horizontal LinearLayout as the root container and then one ScrollView for each column with equal width and containing a vertical LinearLayout:

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" >
    
    <ScrollView
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" >
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >
    
            <Button
                android:id="@+id/button1_1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
    
            <Button
                android:id="@+id/button1_2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
    
            <Button
                android:id="@+id/button1_3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
        </LinearLayout>
    </ScrollView>
    
    <ScrollView
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" >
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >
    
            <Button
                android:id="@+id/button2_1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
    
            <Button
                android:id="@+id/button2_2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
    
            <Button
                android:id="@+id/button2_3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
        </LinearLayout>
    </ScrollView>
    
    <ScrollView
        android:layout_width="0dp"
        android:layout_height="match_parent"
        android:layout_weight="1" >
    
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical" >
    
            <Button
                android:id="@+id/button3_1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
    
            <Button
                android:id="@+id/button3_2"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
    
            <Button
                android:id="@+id/button3_3"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/button1" />
        </LinearLayout>
    </ScrollView>
    

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

Sidebar

Related Questions

I am trying to encrypt/decrypt an XML file. I found this sample for encrypting
There is a xml file like this: sample.xml <root> <keyword_group> <headword>sell/buy</headword> </keyword_group> </root> I'd
This is the sample xml document : <bookstore> <book category=COOKING> <title lang=english>Everyday Italian</title> <author>Giada
This question's solution makes hard-coded transformation of a sample XML tree into a flat
using LINQ to XML, this is a sample of my XML <shows> <Show Code=456
Ho to make this simple xml with php using DOM? Full code will be
Take a simple XML file formatted like this: <Lists> <List> <Note/> ... <Note/> </List>
This sample app (thoughtsite) for App Engine contains a pom.xml in its trunk: http://code.google.com/p/thoughtsite/source/browse/#svn/trunk
I have sample XML like this: <users> <user name=user1> <roles separator=,>ADM,USER</roles> </user> <user name=user2>
I have a sample.xml file like this: 'root element 'FilePath element 'FilePath element value

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.